From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaegeuk Kim Subject: Re: [PATCH] To add NULL pointer check Date: Wed, 03 Apr 2013 16:54:48 +0900 Message-ID: <1364975688.4353.7.camel@kjgkr> References: <1364958193.4353.4.camel@kjgkr> Reply-To: jaegeuk.kim@samsung.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ijlr8iH0UQ4LcZlv7Gcd" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Petr Matousek To: P J P Return-path: In-reply-to: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org --=-ijlr8iH0UQ4LcZlv7Gcd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, 2013-04-03 (=EC=88=98), 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 =3D 0, desired_nrtw; > | =20 > | + /* deal with chardevs and other special file */ > | + if (!mapping->a_ops->writepage) > | + return 0; > | + >=20 > Small question, is it okay to `return 0' here? >=20 > Earlier even if `generic_writepages' returned 0, that did not abort routi= ne=20 > `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, >=20 > 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" i= n > 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/ --=20 Jaegeuk Kim Samsung --=-ijlr8iH0UQ4LcZlv7Gcd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJRW+BIAAoJEEAUqH6CSFDS24QP/1Z7cyyiiJvxfwSsQS1m1A0X EolfWjkqY7fPLVEXEier9ykMunwp5ZBh0odbjJp6ngmg5ztDN7OKPA2tIiln9Ypn 47vLJgQA0ofSZuA3uecOO1uMnXw8HLln9bEvpNOhTte7s9KlSbLmudPiVbFCaLzF +c8pg3LCj5GUquvk7rAvtHn4s/VVsY47U73pMdZl1leNX38RlZ4OnTV8cmlHsDsk 02HO84adHlQTi9u0ZIFxBgehC+QVRw20/nNxHYpAy+Zd7k9YNaabv7wIY+GDWPFc EQPebF8HhTzwdXibvPyOREkSHZbGz5EwwA8Hz5ENZuU5I+WFSKpGl0MWuUy6cBOw ln5/NB0dKHFeuU0l4qw6RJeUcr9zmuEF1hjlW2+FVqA7xesqYwgJ/AMwYvSD4mI/ Op27NRNSyQFcgucnFFdU9BPWcJrtbUtkbC6UPXtaY3XvwRPNsNdGDr4AAdEgjFbw PzXTolmheIbd5rBS76UYcVplHb+fKRyUEP3glQu0rs1gQkTbYhi3ZMw7jm71fP4g ofHQCDEV3Z8GBVNl31adM0R/FOgsQBDeAq/nxyGuYa4ABuemfQm4v7JCkLB6ez5p soR5/dqUP+peeVK7SimECNFqJZ74abgWSi8oDb3bVIBB35+2mXNf1ZE3DYjoRFFx vGl0Sh7prOzcxmW0HY81 =BM5W -----END PGP SIGNATURE----- --=-ijlr8iH0UQ4LcZlv7Gcd--