[patch 09/24] vfs: truncate: dont check immutable twice
From: Miklos Szeredi
Date: Tue May 06 2008 - 05:18:27 EST
From: Miklos Szeredi <mszeredi@xxxxxxx>
vfs_permission(MAY_WRITE) already checked for the inode being
immutable, so no need to repeat it.
Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxx>
---
fs/open.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/fs/open.c
===================================================================
--- linux-2.6.orig/fs/open.c 2008-05-06 11:04:35.000000000 +0200
+++ linux-2.6/fs/open.c 2008-05-06 11:04:35.000000000 +0200
@@ -254,7 +254,7 @@ static long do_sys_truncate(const char _
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);
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/