[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160604200315.GA21661@pc>
Date: Sat, 4 Jun 2016 21:03:15 +0100
From: Salah Triki <salah.triki@....org>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] fs: befs: Increment i_count when inode is found
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
Powered by blists - more mailing lists