diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2008-06-24 10:50:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-26 20:53:15 -0400 |
commit | c82e42da8a6b2f3a85dc4d4278cb8238702f8f64 (patch) | |
tree | 50fb5b52e5c08a20ff4f34f7073e199890f4419e /fs | |
parent | e6305c43eda10ebfd2ad9e35d6e172ccc7bb3695 (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')
-rw-r--r-- | fs/open.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -256,7 +256,7 @@ static long do_sys_truncate(const char __user * path, loff_t length) | |||
256 | goto mnt_drop_write_and_out; | 256 | goto mnt_drop_write_and_out; |
257 | 257 | ||
258 | error = -EPERM; | 258 | error = -EPERM; |
259 | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) | 259 | if (IS_APPEND(inode)) |
260 | goto mnt_drop_write_and_out; | 260 | goto mnt_drop_write_and_out; |
261 | 261 | ||
262 | error = get_write_access(inode); | 262 | error = get_write_access(inode); |