Re: [RFC/PATCH 2/8] revoke: inode revoke lock V7

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

 



Hi Serge,

(Thanks for looking at this. I appreciate the review!)

On Mon, 17 Dec 2007, serge@xxxxxxxxxx wrote:
> >  	struct vfsmount *mnt = nd->mnt;
> > -	struct dentry *dentry = __d_lookup(nd->dentry, name);
> > +	struct dentry *dentry;
> >  
> > +again:
> > +	dentry  = __d_lookup(nd->dentry, name);
> >  	if (!dentry)
> >  		goto need_lookup;
> > +
> > +	if (dentry->d_inode && IS_REVOKE_LOCKED(dentry->d_inode)) {
> 
> not sure whether this is a problem or not, but dentry->d_inode isn't
> locked here, right?  So nothing is keeping do_lookup() returning
> with an inode which gets revoked between here and the return 0
> a few lines down?

I assume you mean S_REVOKE_LOCK and not ->i_mutex, right?

The caller is supposed to block open(2) with chmod(2)/chattr(2) so while 
revoke is in progress, you can get references to the _revoked inode_, 
which is fine (operations on it will fail with EBADFS). The 
->i_revoke_wait bits are there to make sure that while we revoke, you 
can't get a _new reference_ to the inode until we're done.

			Pekka
-
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