Skip to content

Commit

Permalink
[patch 1/5] vfs: truncate: dont check immutable twice
Browse files Browse the repository at this point in the history
vfs_permission(MAY_WRITE) already checked for the inode being
immutable, so no need to repeat it.

Signed-off-by: Miklos Szeredi <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Jul 27, 2008
1 parent e6305c4 commit c82e42d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c82e42d

Please sign in to comment.