Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbbLIGKv (ORCPT ); Wed, 9 Dec 2015 01:10:51 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:53842 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751321AbbLIGKt (ORCPT ); Wed, 9 Dec 2015 01:10:49 -0500 X-AuditID: cbfee61a-f79266d000003652-85-5667c5e7c49a From: Chao Yu To: "'Jaegeuk Kim'" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <1449528805-89661-1-git-send-email-jaegeuk@kernel.org> <1449528805-89661-3-git-send-email-jaegeuk@kernel.org> In-reply-to: <1449528805-89661-3-git-send-email-jaegeuk@kernel.org> Subject: RE: [f2fs-dev] [PATCH 3/3] f2fs: use lock_buffer when changing superblock Date: Wed, 09 Dec 2015 14:10:03 +0800 Message-id: <015101d13248$58a641e0$09f2c5a0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQEyb//MVwu2eBltejo9xhFJqmkYGAHSIUuYn/EPApA= Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsVy+t9jQd3nR9PDDCa9M7R4sn4Ws8WlRe4W e/aeZLG4vGsOmwOLx6ZVnWweuxd8ZvL4vEkugDmKyyYlNSezLLVI3y6BK+NPy232gm+8FUun H2FrYLzF3cXIySEhYCKx5ccqFghbTOLCvfVsXYxcHEICsxglXkzZzwSSEBJ4xShx5o0DiM0m oCKxvOM/WFxEQE2id98UMJtZIFNiQv8Ldoj6aokdzzewgdicAs4Smx/8AFrAwSEsECLR+UwV JMwioCrRt+wFI4jNK2ApcXP1WyhbUOLH5HssECO1JNbvPA41Xl5i85q3zBB3KkjsOPuaEeIE K4lnqw6zQ9SIS2w8cotlAqPQLCSjZiEZNQvJqFlIWhYwsqxilEgtSC4oTkrPNcxLLdcrTswt Ls1L10vOz93ECA7+Z1I7GA/ucj/EKMDBqMTDe8ElPUyINbGsuDL3EKMEB7OSCK9WLVCINyWx siq1KD++qDQntfgQozQHi5I4b+2lyDAhgfTEktTs1NSC1CKYLBMHp1QD4+oa2WK1Cc9MHpa0 Lwp9cMT/9skb0/ba/rqrqPDrwjTzdUcCHm37NmGqTFPiMpW/izN1C/ikdVNDYkVWZ70MyDwV M9+F2z8voSNAYb70GlanzF/CHupm2yrjnncdbbgQxrr288I/kabTmR2vc1f5N7qef2188a1n 0vvD4u9C1tzdsM+3pHA9rxJLcUaioRZzUXEiAHuIFHJ6AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1975 Lines: 57 Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Tuesday, December 08, 2015 6:53 AM > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Cc: Jaegeuk Kim > Subject: [f2fs-dev] [PATCH 3/3] f2fs: use lock_buffer when changing superblock > > When modifying sb contents, we need to use lock its buffer. How about applying the rule to _undo_ flow after f2fs_commit_super failed? Thanks, > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/file.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index a018ed3..a16dfe9 100644 > --- a/fs/f2fs/file.c > +++ b/fs/f2fs/file.c > @@ -1591,7 +1591,9 @@ static int f2fs_ioc_get_encryption_pwsalt(struct file *filp, unsigned > long arg) > return err; > > /* update superblock with uuid */ > + lock_buffer(sbi->raw_super_buf); > generate_random_uuid(sbi->raw_super->encrypt_pw_salt); > + unlock_buffer(sbi->raw_super_buf); > > err = f2fs_commit_super(sbi, false); > > -- > 2.4.9 (Apple Git-60) > > > ------------------------------------------------------------------------------ > Go from Idea to Many App Stores Faster with Intel(R) XDK > Give your users amazing mobile app experiences with Intel(R) XDK. > Use one codebase in this all-in-one HTML5 development environment. > Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. > http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel -- 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/