From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Antonov Subject: Re: [PATCH] hfsplus: add HFSX subfolder count support Date: Tue, 4 Feb 2014 01:25:31 +0100 Message-ID: References: <1391453261-12131-1-git-send-email-saproj@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: "linux-fsdevel@vger.kernel.org" To: Vyacheslav Dubeyko Return-path: Received: from mail-qa0-f53.google.com ([209.85.216.53]:62658 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbaBDAZc convert rfc822-to-8bit (ORCPT ); Mon, 3 Feb 2014 19:25:32 -0500 Received: by mail-qa0-f53.google.com with SMTP id cm18so11307896qab.12 for ; Mon, 03 Feb 2014 16:25:32 -0800 (PST) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > Vyacheslav Dubeyko wrote: >> diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c >> index fa929f3..7d18221 100644 >> --- a/fs/hfsplus/inode.c >> +++ b/fs/hfsplus/inode.c >> @@ -494,6 +494,7 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) >> inode->i_ctime = hfsp_mt2ut(folder->attribute_mod_date); >> HFSPLUS_I(inode)->create_date = folder->create_date; >> HFSPLUS_I(inode)->fs_blocks = 0; >> + HFSPLUS_I(inode)->folder_count = be32_to_cpu(folder->folder_count); > > You check HFSPLUS_HAS_FOLDER_COUNT flag below in hfsplus_cat_write_inode() > but you don't check here. Are you sure that it is right way? Thanks for review, Vyacheslav. Yes. I omit a check here and in decrement/increment code. The only check which must be done is when the record is written to the disk.