aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-06-24 10:50:14 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:16 -0400
commit2f1936b87783a3a56c9441b27b9ba7a747f11e8e (patch)
tree024a0f3da74ba6365f209d03685133760146149b /fs
parentc82e42da8a6b2f3a85dc4d4278cb8238702f8f64 (diff)
[patch 3/5] vfs: change remove_suid() to file_remove_suid()
All calls to remove_suid() are made with a file pointer, because (similarly to file_update_time) it is called when the file is written. Clean up callers by passing in a file instead of a dentry. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/fuse/file.c2
-rw-r--r--fs/ntfs/file.c2
-rw-r--r--fs/splice.c4
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 67ff2c6a8f63..2bada6bbc317 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -893,7 +893,7 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
893 if (count == 0) 893 if (count == 0)
894 goto out; 894 goto out;
895 895
896 err = remove_suid(file->f_path.dentry); 896 err = file_remove_suid(file);
897 if (err) 897 if (err)
898 goto out; 898 goto out;
899 899
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index 3c5550cd11d6..d020866d4232 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -2118,7 +2118,7 @@ static ssize_t ntfs_file_aio_write_nolock(struct kiocb *iocb,
2118 goto out; 2118 goto out;
2119 if (!count) 2119 if (!count)
2120 goto out; 2120 goto out;
2121 err = remove_suid(file->f_path.dentry); 2121 err = file_remove_suid(file);
2122 if (err) 2122 if (err)
2123 goto out; 2123 goto out;
2124 file_update_time(file); 2124 file_update_time(file);
diff --git a/fs/splice.c b/fs/splice.c
index 47dc1a445d1f..b30311ba8af6 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -772,7 +772,7 @@ generic_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out,
772 ssize_t ret; 772 ssize_t ret;
773 int err; 773 int err;
774 774
775 err = remove_suid(out->f_path.dentry); 775 err = file_remove_suid(out);
776 if (unlikely(err)) 776 if (unlikely(err))
777 return err; 777 return err;
778 778
@@ -830,7 +830,7 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
830 ssize_t ret; 830 ssize_t ret;
831 831
832 inode_double_lock(inode, pipe->inode); 832 inode_double_lock(inode, pipe->inode);
833 ret = remove_suid(out->f_path.dentry); 833 ret = file_remove_suid(out);
834 if (likely(!ret)) 834 if (likely(!ret))
835 ret = __splice_from_pipe(pipe, &sd, pipe_to_file); 835 ret = __splice_from_pipe(pipe, &sd, pipe_to_file);
836 inode_double_unlock(inode, pipe->inode); 836 inode_double_unlock(inode, pipe->inode);
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 5e3b57516ec7..82333b3e118e 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -711,7 +711,7 @@ start:
711 !capable(CAP_FSETID)) { 711 !capable(CAP_FSETID)) {
712 error = xfs_write_clear_setuid(xip); 712 error = xfs_write_clear_setuid(xip);
713 if (likely(!error)) 713 if (likely(!error))
714 error = -remove_suid(file->f_path.dentry); 714 error = -file_remove_suid(file);
715 if (unlikely(error)) { 715 if (unlikely(error)) {
716 goto out_unlock_internal; 716 goto out_unlock_internal;
717 } 717 }