[Top] [All Lists]

Re: [PATCH] vfs: Fix possible NULL pointer dereference in inode_permissi

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: [PATCH] vfs: Fix possible NULL pointer dereference in inode_permission()
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 11 Jan 2014 02:32:35 -0800
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>, Paul Moore <paul@xxxxxxxxxxxxxx>, Matthew Wilcox <matthew@xxxxxx>, Stephen Smalley <sds@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, xfs@xxxxxxxxxxx, Eric Paris <eparis@xxxxxxxxxx>, James Morris <james.l.morris@xxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, stable <stable@xxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Paul McKenney <paulmck@xxxxxxxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140110181434.GH1935@xxxxxxx>
References: <20140109165012.391db81e@xxxxxxxxxxxxxxxxxx> <20140109223127.GM10323@xxxxxxxxxxxxxxxxxx> <CA+55aFzCTPYEQCPnLBi1CwmMTocVqCFiCuJ391HkVx1CMw61ug@xxxxxxxxxxxxxx> <20140109182523.5b50131f@xxxxxxxxxxxxxxxxxx> <20140109182756.17abaaa8@xxxxxxxxxxxxxxxxxx> <1389310626.15209.92.camel@localhost> <CA+55aFzd2nw=JU4s0u=PJbATK0bwhm0kot3zRH=anLLT6THRFQ@xxxxxxxxxxxxxx> <20140110000642.GN10323@xxxxxxxxxxxxxxxxxx> <20140110093148.GA26159@xxxxxxxxxxxxx> <20140110181434.GH1935@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Jan 10, 2014 at 12:14:34PM -0600, Ben Myers wrote:
> > What's really needed there to make XFS behave more similar to everyone
> > else is a way for the filesystem to say: "I can't actually free this
> > inode right now, but I'll come back to you later".
> This test might read something like:  "If my link count has gone to zero, and 
> I
> am the last inode in my cluster to be freed, and there are other inodes from 
> my
> cluster incore, I cannot be freed."

It's more complicated than that.  In theory we would free the inode
easily as soon as the VFS wants it, but performance would be horrible
as we would have to synchronously write back the inode.  Note that it
really matters for the interface, that just needs to be an:  I won't
free this right now, but I'll call you back later when I can.

<Prev in Thread] Current Thread [Next in Thread>