aboutsummaryrefslogtreecommitdiff
path: root/fs/open.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-06-24 16:50:12 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:15 -0400
commitc82e42da8a6b2f3a85dc4d4278cb8238702f8f64 (patch)
tree50fb5b52e5c08a20ff4f34f7073e199890f4419e /fs/open.c
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>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index bb98d2fe809..b2e4c93aed0 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)
goto mnt_drop_write_and_out;
error = -EPERM;
- if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
+ if (IS_APPEND(inode))
goto mnt_drop_write_and_out;
error = get_write_access(inode);