[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090315183725.GA18123@ioremap.net>
Date: Sun, 15 Mar 2009 21:37:25 +0300
From: Evgeniy Polyakov <zbr@...emap.net>
To: Boaz Harrosh <bharrosh@...asas.com>
Cc: Avishay Traeger <avishay@...il.com>, Jeff Garzik <jeff@...zik.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
open-osd <osd-dev@...n-osd.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
James Bottomley <James.Bottomley@...senPartnership.com>
Subject: Re: [PATCH 5/8] exofs: dir_inode and directory operations
On Sun, Mar 15, 2009 at 08:10:36PM +0200, Boaz Harrosh (bharrosh@...asas.com) wrote:
> >>> + atomic_inc(&inode->i_count);
> >>> +
> >>> + ret = exofs_async_op(or, create_done, inode, oi->i_cred);
> >>> + if (ret) {
> >>> + atomic_dec(&inode->i_count);
> >> igrab()/iput()?
> >>
> >
> > Thanks, makes much more sense. Sorry leftovers from 2.6.10
> >
>
> It's the same at ext2. I looked at the igrab()/iput() code it does some extra
> locks which I'm afraid of at this stage. I'll postpone this to the next (next)
> merge window, after I ran with it for a while.
It does not allow to work with to be freed inode, getting that it is
fresh inode, things should be ok just to increase the reference counter,
but iput() may highlight problems if inode's reference counter can be
decreased, and apparently it can not since otherwise increment would not
be added around exofs_async_op().
What if exofs_async_op() drops a reference and returns error? inode will
not be freed and will not be placed into to be freed list, which in turn
will break accounting and potentially prevent superblock freeing.
--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists