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: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c82e42da8a6b2f3a85dc4d4278cb8238702f8f64;p=linux-2.6 [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 bb98d2fe80..b2e4c93aed 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);