mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
fs/hugetlbfs/inode.c: remove redundant -ENIVAL return from hugetlbfs_setattr()
There is no need to have a local return code set with -EINVAL when both the conditions following it return error codes appropriately. Just remove the redundant one. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Anshuman Khandual <[email protected]> Reviewed-by: Mike Kravetz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
0b07ff3972
commit
007ab7b49a
1 file changed
-1
@@ -668,7 +668,6 @@ static int hugetlbfs_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
return error;
|
||||
|
||||
if (ia_valid & ATTR_SIZE) {
|
||||
error = -EINVAL;
|
||||
if (attr->ia_size & ~huge_page_mask(h))
|
||||
return -EINVAL;
|
||||
error = hugetlb_vmtruncate(inode, attr->ia_size);
|
||||
|
||||
Reference in new issue
Block a user