Re: [PATCH 5/8] exofs: dir_inode and directory operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 15, 2009 at 08:10:36PM +0200, Boaz Harrosh (bharrosh@xxxxxxxxxxx) 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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux