lkml.org 
[lkml]   [2017]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/hugetlbfs: Remove the redundant -ENIVAL return from hugetlbfs_setattr()
Date
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.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
fs/hugetlbfs/inode.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 59073e9..cff3939 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -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);
--
1.8.5.2
\
 
 \ /
  Last update: 2017-09-29 16:56    [W:0.302 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site