1
0
Fork 0

[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>
hifive-unleashed-5.1
Miklos Szeredi 2008-06-24 16:50:12 +02:00 committed by Al Viro
parent e6305c43ed
commit c82e42da8a
1 changed files with 1 additions and 1 deletions

View File

@ -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);