lkml.org 
[lkml]   [2013]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] To add NULL pointer check
From
Date
Hi,

2013-04-03 (수), 12:30 +0530, P J P:
> +-- On Wed, 3 Apr 2013, Jaegeuk Kim wrote --+
> | diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> | index 47a2d7c..cf9ff5f 100644
> | --- a/fs/f2fs/data.c
> | +++ b/fs/f2fs/data.c
> | @@ -559,6 +559,10 @@ static int f2fs_write_data_pages(struct
> | address_space *mapping,
> | int ret;
> | long excess_nrtw = 0, desired_nrtw;
> |
> | + /* deal with chardevs and other special file */
> | + if (!mapping->a_ops->writepage)
> | + return 0;
> | +
>
> Small question, is it okay to `return 0' here?
>
> Earlier even if `generic_writepages' returned 0, that did not abort routine
> `f2fs_write_data_pages'.

I'm confusing the question because f2fs doesn't use
generic_writepages(), since f2fs_write_data_pages() is linked to
a_ops->writepages.
In do_writepages(), always f2fs_write_data_pages() is triggered instead
of generic_writepages().
Isn't it?

Thanks,

>
> Thank you.
> --
> Prasad J Pandit / Red Hat Security Response Team
> DB7A 84C5 D3F9 7CD1 B5EB C939 D048 7860 3655 602B
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
Jaegeuk Kim
Samsung
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-04-03 10:21    [W:0.054 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site