mm: do_generic_file_read() doesn't need to validate filp
Subsystems (2)
PATCH 1/1 mm: do_generic_file_read() doesn't need to validate filp
From: Krishna Kumar <[email protected]>
do_generic_file_read() doesn't need to validate filp when accessing it. This is probably a remnant of an earlier code.
--- mm/filemap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/filemap.c +1 -2
@@ -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,
Hi
Please write explictly that filp is never passed NULL for patch description clarify. Otherthing, looks good to me.
Quoted 28 lines
From: Krishna Kumar <[email protected]>
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 <[email protected]>--- mm/filemap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)diff -ruNp
2.6.27-rc7-org/mm/filemap.c2.6.27-rc7-new/mm/filemap.cmm/filemap.c +1
-3@@ -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, --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 4 lines · Krishna Kumar
From: Krishna Kumar <[email protected]>
do_generic_file_read()doesn't need to validate filp when accessing it. This is probably a remnant of an earlier code.
Looks good, thanks.