public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Salah Triki <salah.triki@acm.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] fs: befs: Increment i_count when inode is found
Date: Sat, 4 Jun 2016 21:03:15 +0100	[thread overview]
Message-ID: <20160604200315.GA21661@pc> (raw)
In-Reply-To: <20160604193242.GB14480@ZenIV.linux.org.uk>

On Sat, Jun 04, 2016 at 08:32:42PM +0100, Al Viro wrote:
> On Sat, Jun 04, 2016 at 07:53:21PM +0100, Salah Triki wrote:
> > As VFS expects, i_count field is incremented when the named inode is found.
> 
> VFS expects no such thing.  Incidentally, you have neither bothered to
> check other filesystems nor cared to look at fs/inode.c.  OK, suppose you
> have found a huge multi-filesystem bug - such things happen from time to
> time.  But you have not even bothered to test your conjecture; this "fix"
> had never been tried or even compiled.
> 
> What actually happens is that iget_locked() acquires a reference to inode.
> That reference is either dropped by iget_failed() (called by befs_iget()
> in case of failure to read and initialized the sucker) or used up by
> d_add() as a reference to hold dentry->d_inode.
> 
> Similar situation holds for other filesystems; they do not need to manipulate
> i_count at all.

thanks for your comments

  reply	other threads:[~2016-06-04 20:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-04 18:53 [PATCH 1/3] fs: befs: Lookup must return error code only on real error Salah Triki
2016-06-04 18:53 ` [PATCH 2/3] fs: befs: Insert NULL inode to dentry Salah Triki
2016-06-04 18:53 ` [PATCH 3/3] fs: befs: Increment i_count when inode is found Salah Triki
2016-06-04 19:14   ` kbuild test robot
2016-06-04 19:32   ` Al Viro
2016-06-04 20:03     ` Salah Triki [this message]
2016-06-04 19:37 ` [PATCH 1/3] fs: befs: Lookup must return error code only on real error Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160604200315.GA21661@pc \
    --to=salah.triki@acm.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox