summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2022-10-16 16:06:53 -0700
committerAndrew Morton <akpm@linux-foundation.org>2022-10-16 16:06:53 -0700
commit280330fac48280e16454cfa46c368af4812ad79c (patch)
tree18b9ed796c57e3929e50b9b03f2c6501740b03d6 /fs/nfs/write.c
parentd0d51a97063db4704a5ef6bc978dddab1636a306 (diff)
parent4fe89d07dcc2804c8b562f6c7896a45643d34b2f (diff)
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c25
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)
{