mm: do_generic_file_read() never gets a NULL 'filp' argument
authorKrishna Kumar <krkumar2@in.ibm.com>
Thu, 16 Oct 2008 05:01:13 +0000 (22:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:29 +0000 (11:21 -0700)
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>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c

index 876bc59..bf8f9c0 100644 (file)
@@ -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,