Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_delegation_noreclaim() [ver #2]

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

 



Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> wrote:

> > I think it is incorrectly used.  Given that the rcu_dereference() in:
> > 
> > 	if (rcu_dereference(nfsi->delegation) != NULL) {
> > 		spin_lock(&clp->cl_lock);
> > 		delegation = nfs_detach_delegation_locked(nfsi, NULL);
> > 		spin_unlock(&clp->cl_lock);
> > 		if (delegation != NULL)
> > 			nfs_do_return_delegation(inode, delegation, 0);
> > 	}
> 
> And nfs_detach_delegation_locked() rechecks nfsi->delegation() under
> the lock, so this is a legitimate use.
> 
> The pointer is not held constant, but any changes will be accounted
> for and handled correctly.  So I would argue that the pointer value is
> in fact protected by the recheck-under-lock algorithm used here.

A legitimate use of what?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux