mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rui Xiang <rui.xiang@huawei.com>
To: <linux-kernel@vger.kernel.org>
Cc: Rui Xiang <rui.xiang@huawei.com>
Subject: [PATCH 2/2] romfs: remove an redundant if condition in romfs_readpage
Date: Tue, 26 Nov 2013 16:39:09 +0800	[thread overview]
Message-ID: <1385455149-20752-2-git-send-email-rui.xiang@huawei.com> (raw)
In-Reply-To: <1385455149-20752-1-git-send-email-rui.xiang@huawei.com>

Here ret always equals 0, so SetPageUptodate directly.

Signed-off-by: Rui Xiang <rui.xiang@huawei.com>
---
 fs/romfs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/romfs/super.c b/fs/romfs/super.c
index d841878..b5e4ad4 100644
--- a/fs/romfs/super.c
+++ b/fs/romfs/super.c
@@ -129,8 +129,7 @@ static int romfs_readpage(struct file *file, struct page *page)
 
 	if (fillsize < PAGE_SIZE)
 		memset(buf + fillsize, 0, PAGE_SIZE - fillsize);
-	if (ret == 0)
-		SetPageUptodate(page);
+	SetPageUptodate(page);
 
 	flush_dcache_page(page);
 	kunmap(page);
-- 
1.8.2.2



  reply	other threads:[~2013-11-26  8:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26  8:39 [PATCH 1/2] romfs: fix returm err while getting inode in fill_super Rui Xiang
2013-11-26  8:39 ` Rui Xiang [this message]
2013-12-16  8:10   ` [PATCH 2/2] romfs: remove an redundant if condition in romfs_readpage Andrew Morton
2013-12-16  8:24     ` Rui Xiang

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=1385455149-20752-2-git-send-email-rui.xiang@huawei.com \
    --to=rui.xiang@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®