lkml.org 
[lkml]   [2008]   [Sep]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromKrishna Kumar <>
DateMon, 22 Sep 2008 09:33:25 +0530
Subject[PATCH] mm: do_generic_file_read() doesn't need to validate filp
From: Krishna Kumar <krkumar2@in.ibm.com>

do_generic_file_read() doesn't need to validate filp when accessing it. This
is probably a remnant of an earlier code.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.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,

\
 
 \ /
  Last update: 2008-09-22 06:07    [from the cache]
©2003-2008