summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-10-17 17:06:53 -0700
committerMark Fasheh <mark.fasheh@oracle.com>2006-12-01 18:28:43 -0800
commite88d0c9a4180821ad64c1fb421e4c28f8155eb74 (patch)
tree6efa12630d5e00583d57277096a91934826dec8a /fs/ocfs2/file.c
parentd23a147bb6e8d467e8df73b6589888717da3b9ce (diff)
downloadop-kernel-dev-e88d0c9a4180821ad64c1fb421e4c28f8155eb74.zip
op-kernel-dev-e88d0c9a4180821ad64c1fb421e4c28f8155eb74.tar.gz
ocfs2: Remove ocfs2_write_should_remove_suid()
Use should_remove_suid() instead. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index fe6b795..39b2f16 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -943,20 +943,6 @@ out:
return ret;
}
-static inline int ocfs2_write_should_remove_suid(struct inode *inode)
-{
- mode_t mode = inode->i_mode;
-
- if (!capable(CAP_FSETID)) {
- if (unlikely(mode & S_ISUID))
- return 1;
-
- if (unlikely((mode & S_ISGID) && (mode & S_IXGRP)))
- return 1;
- }
- return 0;
-}
-
static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
const struct iovec *iov,
unsigned long nr_segs,
@@ -1021,7 +1007,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
* inode. There's also the dinode i_size state which
* can be lost via setattr during extending writes (we
* set inode->i_size at the end of a write. */
- if (ocfs2_write_should_remove_suid(inode)) {
+ if (should_remove_suid(filp->f_dentry)) {
if (meta_level == 0) {
ocfs2_meta_unlock(inode, meta_level);
meta_level = 1;
OpenPOWER on IntegriCloud