From: Miklos Szeredi Date: Tue, 24 Jun 2008 14:50:12 +0000 (+0200) Subject: [patch 1/5] vfs: truncate: dont check immutable twice X-Git-Tag: v2.6.27-rc1~73^2~28 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c82e42da8a6b2f3a85dc4d4278cb8238702f8f64;p=linux-2.6-omap-h63xx.git [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 Acked-by: Christoph Hellwig --- 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);