* [PATCH] ceph: delete unnecessary condition judgment [not found] <1398666300-28368-1-git-send-email-zhenzhang.zhang@huawei.com> @ 2014-04-28 6:27 ` Zhang Zhen 2014-04-28 14:16 ` Alex Elder 0 siblings, 1 reply; 2+ messages in thread From: Zhang Zhen @ 2014-04-28 6:27 UTC (permalink / raw) To: sage, ukernel; +Cc: ceph-devel 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 <zhenzhang.zhang@huawei.com> --- fs/ceph/addr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index b53278c..8f579d2 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -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; -- 1.8.1.2 . ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: delete unnecessary condition judgment 2014-04-28 6:27 ` [PATCH] ceph: delete unnecessary condition judgment Zhang Zhen @ 2014-04-28 14:16 ` Alex Elder 0 siblings, 0 replies; 2+ messages in thread From: Alex Elder @ 2014-04-28 14:16 UTC (permalink / raw) To: Zhang Zhen, sage, ukernel; +Cc: ceph-devel On 04/28/2014 01:27 AM, Zhang Zhen wrote: > 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 <elder@linaro.org> > Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com> > --- > fs/ceph/addr.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c > index b53278c..8f579d2 100644 > --- a/fs/ceph/addr.c > +++ b/fs/ceph/addr.c > @@ -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; > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-28 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1398666300-28368-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-04-28 6:27 ` [PATCH] ceph: delete unnecessary condition judgment Zhang Zhen
2014-04-28 14:16 ` Alex Elder
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.