Skip to content

Commit

Permalink
mm: do_generic_file_read() never gets a NULL 'filp' argument
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krishna Kumar authored and Linus Torvalds committed Oct 16, 2008
1 parent b4d1d99 commit 0c6aa26
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,7 @@ static void do_generic_file_read(struct file *filp, loff_t *ppos,
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,
Expand Down

0 comments on commit 0c6aa26

Please sign in to comment.