ceph: delete unnecessary condition judgment
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 ceph: delete unnecessary condition judgment
If the return number of ceph_osdc_readpages() is not less than zero, it is certainly greater than or equal to zero.
So the condition judgment is unnecessary.
Signed-off-by Zhang Zhen <[email protected]>
--- fs/ceph/addr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ceph/addr.c +1 -2
@@ -221,8 +221,7 @@ static int readpage_nounlock(struct file *filp, struct page *page) }SetPageUptodate (page); -if (err >=0 ) -ceph_readpage_to_fscache (inode, page); +ceph_readpage_to_fscache (inode, page); out:return err <0 ? err :0 ;
Signature · 4 lines
1.8.1.2 .
Quoted 5 lines · Zhang Zhen
If the return number of
ceph_osdc_readpages()is not less than zero, it is certainly greater than or equal to zero.So the condition judgment is unnecessary.
Looks good.
Reviewed-by Alex Elder <[email protected]>
Quoted 20 lines
Signed-off-by Zhang Zhen <[email protected]>--- fs/ceph/addr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)fs/ceph/addr.c +1
-2@@ -221,8 +221,7 @@ static int readpage_nounlock(struct file *filp, struct page *page) }SetPageUptodate (page); -if (err >=0 ) -ceph_readpage_to_fscache (inode, page); +ceph_readpage_to_fscache (inode, page); out:return err <0 ? err :0 ;