diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-10-17 20:06:53 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-12-01 21:28:43 -0500 |
commit | e88d0c9a4180821ad64c1fb421e4c28f8155eb74 (patch) | |
tree | 6efa12630d5e00583d57277096a91934826dec8a /fs/ocfs2/file.c | |
parent | d23a147bb6e8d467e8df73b6589888717da3b9ce (diff) |
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.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index fe6b795b1a45..39b2f1653e25 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -943,20 +943,6 @@ out: | |||
943 | return ret; | 943 | return ret; |
944 | } | 944 | } |
945 | 945 | ||
946 | static inline int ocfs2_write_should_remove_suid(struct inode *inode) | ||
947 | { | ||
948 | mode_t mode = inode->i_mode; | ||
949 | |||
950 | if (!capable(CAP_FSETID)) { | ||
951 | if (unlikely(mode & S_ISUID)) | ||
952 | return 1; | ||
953 | |||
954 | if (unlikely((mode & S_ISGID) && (mode & S_IXGRP))) | ||
955 | return 1; | ||
956 | } | ||
957 | return 0; | ||
958 | } | ||
959 | |||
960 | static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, | 946 | static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, |
961 | const struct iovec *iov, | 947 | const struct iovec *iov, |
962 | unsigned long nr_segs, | 948 | unsigned long nr_segs, |
@@ -1021,7 +1007,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, | |||
1021 | * inode. There's also the dinode i_size state which | 1007 | * inode. There's also the dinode i_size state which |
1022 | * can be lost via setattr during extending writes (we | 1008 | * can be lost via setattr during extending writes (we |
1023 | * set inode->i_size at the end of a write. */ | 1009 | * set inode->i_size at the end of a write. */ |
1024 | if (ocfs2_write_should_remove_suid(inode)) { | 1010 | if (should_remove_suid(filp->f_dentry)) { |
1025 | if (meta_level == 0) { | 1011 | if (meta_level == 0) { |
1026 | ocfs2_meta_unlock(inode, meta_level); | 1012 | ocfs2_meta_unlock(inode, meta_level); |
1027 | meta_level = 1; | 1013 | meta_level = 1; |