lkml.org 
[lkml]   [2009]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/8] exofs: dir_inode and directory operations
On Sun, Mar 15, 2009 at 08:10:36PM +0200, Boaz Harrosh (bharrosh@panasas.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


\
 
 \ /
  Last update: 2009-03-15 19:41    [W:0.032 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site