aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-06-24 10:50:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:15 -0400
commitc82e42da8a6b2f3a85dc4d4278cb8238702f8f64 (patch)
tree50fb5b52e5c08a20ff4f34f7073e199890f4419e
parente6305c43eda10ebfd2ad9e35d6e172ccc7bb3695 (diff)
[patch 1/5] vfs: truncate: dont check immutable twice
vfs_permission(MAY_WRITE) already checked for the inode being immutable, so no need to repeat it. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Christoph Hellwig <hch@infradead.org>
-rw-r--r--fs/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index bb98d2fe809f..b2e4c93aed03 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -256,7 +256,7 @@ static long do_sys_truncate(const char __user * path, loff_t length)
256 goto mnt_drop_write_and_out; 256 goto mnt_drop_write_and_out;
257 257
258 error = -EPERM; 258 error = -EPERM;
259 if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) 259 if (IS_APPEND(inode))
260 goto mnt_drop_write_and_out; 260 goto mnt_drop_write_and_out;
261 261
262 error = get_write_access(inode); 262 error = get_write_access(inode);