diff options
author | 2022-10-16 16:06:53 -0700 | |
---|---|---|
committer | 2022-10-16 16:06:53 -0700 | |
commit | 280330fac48280e16454cfa46c368af4812ad79c (patch) | |
tree | 18b9ed796c57e3929e50b9b03f2c6501740b03d6 /fs/nfs/write.c | |
parent | nilfs2: fix leak of nilfs_root in case of writer thread creation failure (diff) | |
parent | Linux 6.0 (diff) | |
download | wireguard-linux-280330fac48280e16454cfa46c368af4812ad79c.tar.xz wireguard-linux-280330fac48280e16454cfa46c368af4812ad79c.zip |
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1843fa235d9b..f41d24b54fd1 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1496,31 +1496,6 @@ void nfs_commit_prepare(struct rpc_task *task, void *calldata) NFS_PROTO(data->inode)->commit_rpc_prepare(task, data); } -/* - * Special version of should_remove_suid() that ignores capabilities. - */ -static int nfs_should_remove_suid(const struct inode *inode) -{ - umode_t mode = inode->i_mode; - int kill = 0; - - /* suid always must be killed */ - if (unlikely(mode & S_ISUID)) - kill = ATTR_KILL_SUID; - - /* - * sgid without any exec bits is just a mandatory locking mark; leave - * it alone. If some exec bits are set, it's a real sgid; kill it. - */ - if (unlikely((mode & S_ISGID) && (mode & S_IXGRP))) - kill |= ATTR_KILL_SGID; - - if (unlikely(kill && S_ISREG(mode))) - return kill; - - return 0; -} - static void nfs_writeback_check_extend(struct nfs_pgio_header *hdr, struct nfs_fattr *fattr) { |