diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2008-06-24 16:50:12 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-26 20:53:15 -0400 |
commit | c82e42da8a6b2f3a85dc4d4278cb8238702f8f64 (patch) | |
tree | 50fb5b52e5c08a20ff4f34f7073e199890f4419e | |
parent | e6305c43eda10ebfd2ad9e35d6e172ccc7bb3695 (diff) | |
download | linux-c82e42da8a6b2f3a85dc4d4278cb8238702f8f64.tar.bz2 |
[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.c | 2 |
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) 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); |