lkml.org 
[lkml]   [2003]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] nfs_unlink() race (was: nfs_refresh_inode: inode number mismatch)
From
>>>>> " " == viro  <viro@parcelfarce.linux.theplanet.co.uk> writes:

> On Mon, Jun 09, 2003 at 06:51:41AM -0700, Frank Cusack wrote:
>> When foo is unlinked, nfs_unlink() does a sillyrename, this
>> puts the dentry on nfs_delete_queue, and (in the VFS) unhashes
>> it from the dcache. This causes a problem, because
>> dentry->d_parent->d_inode is now guaranteed to remain stale.
>> (OK, I'm not really sure about this last part.)

> ????

Al,

AFAICS the problem is the following:

- NFS sillyrenames dentry 1
- Upon return from nfs_unlink(), VFS unhashes dentry 1

- Upon next lookup, VFS+NFS conspire to create aliased dentry 2 to
sillyrenamed file
- Upon last close of files associated with dentry 1, NFS completes
sillyrename. File is unlinked on server.
- Aliased dentry 2 is still around, but it is now pointing to stale
fh.

IOW we just want to prevent VFS from unhashing the dentry in the first
place: dentry aliasing cannot work together with sillyrename.

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.103 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site