public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krishna Kumar <krkumar2@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: krkumar2@in.ibm.com, Krishna Kumar <krkumar2@in.ibm.com>
Subject: [PATCH] mm: do_generic_file_read() never gets a NULL 'filp' argument
Date: Mon, 22 Sep 2008 11:46:10 +0530	[thread overview]
Message-ID: <20080922061610.20158.86022.sendpatchset@localhost.localdomain> (raw)

From: Krishna Kumar <krkumar2@in.ibm.com>

The 'filp' argument to do_generic_file_read() is never NULL.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 mm/filemap.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -ruNp 2.6.27-rc7-org/mm/filemap.c 2.6.27-rc7-new/mm/filemap.c
--- 2.6.27-rc7-org/mm/filemap.c	2008-09-17 12:53:25.000000000 +0530
+++ 2.6.27-rc7-new/mm/filemap.c	2008-09-17 12:53:59.000000000 +0530
@@ -1186,8 +1186,7 @@ out:
 	ra->prev_pos |= prev_offset;
 
 	*ppos = ((loff_t)index << PAGE_CACHE_SHIFT) + offset;
-	if (filp)
-		file_accessed(filp);
+	file_accessed(filp);
 }
 
 int file_read_actor(read_descriptor_t *desc, struct page *page,

             reply	other threads:[~2008-09-22  6:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22  6:16 Krishna Kumar [this message]
2008-09-22  8:33 ` [PATCH] mm: do_generic_file_read() never gets a NULL 'filp' argument Andrew Morton
2008-09-22  8:39   ` Christoph Hellwig
2008-09-22 17:36     ` Andrew Morton
2008-09-23 11:00       ` KOSAKI Motohiro
2008-09-22  8:40   ` KOSAKI Motohiro

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=20080922061610.20158.86022.sendpatchset@localhost.localdomain \
    --to=krkumar2@in.ibm.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