From patchwork Sat Mar 7 10:07:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuan Zhong X-Patchwork-Id: 5958981 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CA6FF9F373 for ; Sat, 7 Mar 2015 10:08:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A99220392 for ; Sat, 7 Mar 2015 10:08:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1F502037E for ; Sat, 7 Mar 2015 10:08:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757345AbbCGKHs (ORCPT ); Sat, 7 Mar 2015 05:07:48 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:28796 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757334AbbCGKHp (ORCPT ); Sat, 7 Mar 2015 05:07:45 -0500 Received: from epcpsbgx3.samsung.com (u163.gpu120.samsung.co.kr [203.254.230.163]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NKU00KB26SW5A00@mailout2.samsung.com> for linux-fsdevel@vger.kernel.org; Sat, 07 Mar 2015 19:07:44 +0900 (KST) X-AuditID: cbfee6a3-f79a86d00000396e-8e-54facdf0dbb2 Received: from epmailer02 ( [203.254.219.142]) by epcpsbgx3.samsung.com (EPCPMTA) with SMTP id D7.76.14702.0FDCAF45; Sat, 07 Mar 2015 19:07:44 +0900 (KST) Date: Sat, 07 Mar 2015 10:07:44 +0000 (GMT) From: Yuan Zhong Subject: [f2fs-dev] [PATCH 2/3] f2fs:set the correct place of initializing *res_page To: Jaegeuk Kim Cc: "linux-kernel@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "linux-fsdevel@vger.kernel.org" Reply-to: yuan.mark.zhong@samsung.com MIME-version: 1.0 X-MTR: 20150307100555853@yuan.mark.zhong Msgkey: 20150307100555853@yuan.mark.zhong X-EPLocale: en_US.windows-1252 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150307100555853@yuan.mark.zhong X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-transfer-encoding: base64 Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 Message-id: <190202356.458601425722862565.JavaMail.weblogic@epmlwas08b> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPIsWRmVeSWpSXmKPExsVy+t/tPt0PZ3+FGKyYwWGxZ+9JFgdGj8+b 5AIYo7hsUlJzMstSi/TtErgyjm3+xl5wi6Ni49YWtgbGHRxdjJwcQgJaEu9/PGTuYuTgkBAw kVhxQwckLCEgJnHh3nq2LkYuoJI5jBJLr5xmAkmwCKhI/FlwkA3EZhPQl7izbx8jiC0sECLR u2IVWFxEQE1iz6UtLCDNzAI3GSV6jvSDLRASUJU4vrYUpIZXQFDi5MwnLBDLNCT6m9rZIOKa Egc+TWKEiMtJLJl6mQnC5pWY0f6UBSY+7esaZghbWuL8rA2MMEcv/v4YKs4vcez2DqheAYmp Zw5C1ehKTDyxiA3C5pNYs/AtC0z9rlPLmWF23d8yF6pXQmJryxNWEJtZQFFiSvdDdgjbQOLI ojmsqH7hALLdJbrOJk1glJ2FJDMLSfcsJN3IahYwsqxiFE0tSC4oTkqvMNYrTswtLs1L10vO z93ECI7mZ4t3MP4/b32IUYCDUYmHd8KMXyFCrIllxZW5hxglOJiVRHhfdQGFeFMSK6tSi/Lj i0pzUosPMUpzsCiJ8/4/lxsiJJCeWJKanZpakFoEk2Xi4JRqYIx58zXE56jHg8myz94E6oqI mZ4XCM/RE7W++Ewg6qvetsKtq7fUb53Vx8eg1jmV6Ux3/0cFtbUBhS7fojlvpu3ZyXFgbUFS uEdR4lvnm5sL30W5eZz51LQr4b0de5KwqiC/xtU3ESsPR96wqS+zOHZcQu+p9NsQU0nFRubc umVvazuCdSZ/VmIpzkg01GIuKk4EAJduj0fiAgAA Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function 'find_in_inline_dir()' contain 'res_page' as an argument. So, we should initiaize 'res_page' before this function. Signed-off-by: Yuan Zhong --- fs/f2fs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.9.5 Reviewed-by: Chao Yu diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 590aeef..a28909d 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -219,14 +219,14 @@ struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir, unsigned int max_depth; unsigned int level; + *res_page = NULL; + if (f2fs_has_inline_dentry(dir)) return find_in_inline_dir(dir, child, res_page); if (npages == 0) return NULL; - *res_page = NULL; - name_hash = f2fs_dentry_hash(child); max_depth = F2FS_I(dir)->i_current_depth;