CEPH filesystem development
 help / color / mirror / Atom feed
From: Zhang Zhen <zhenzhang.zhang@huawei.com>
To: sage@inktank.com, ukernel@gmail.com
Cc: ceph-devel@vger.kernel.org
Subject: [PATCH] ceph: delete unnecessary condition judgment
Date: Mon, 28 Apr 2014 14:27:59 +0800	[thread overview]
Message-ID: <535DF4EF.8060703@huawei.com> (raw)
In-Reply-To: <1398666300-28368-1-git-send-email-zhenzhang.zhang@huawei.com>

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


.





       reply	other threads:[~2014-04-28  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1398666300-28368-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-04-28  6:27 ` Zhang Zhen [this message]
2014-04-28 14:16   ` [PATCH] ceph: delete unnecessary condition judgment Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=535DF4EF.8060703@huawei.com \
    --to=zhenzhang.zhang@huawei.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sage@inktank.com \
    --cc=ukernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox