linux-fsdevel mailing list

FromSubjectsort iconDate
Sage Weil
[PATCH] vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOVE fi...
Al, Christoph, Zach just ran into this bug as well. Does this fix look reasonable? thanks- sage ---- From Sage Weil <sage@newdream.net> d_move() is strangely implemented in that it swaps the position of new_dentry and old_dentry in the namespace. This is admittedly weird (see comments for d_move_locked()), but normally harmless: even though new_dentry swaps places with old_dentry, it is unhashed, and won't be seen by a subsequent lookup. However, vfs_rename_dir() doesn't p...
Jul 11, 3:47 pm 2008
Miklos Szeredi
Re: [PATCH] vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOV...
I think rehashing the new dentry is bogus, even on error. And it looks racy with lookup as well. I wonder what the original reason for that was? Git history doesn't tell... So a better fix would be just to remove the rehashing completely. Does the below patch work for you? Thanks, Miklos --- fs/namei.c | 2 -- 1 file changed, 2 deletions(-) Index: linux-2.6/fs/namei.c =================================================================== --- linux-2.6.orig/fs/namei.c 2008-07-11 2...
Jul 11, 4:53 pm 2008
Sage Weil
Re: [PATCH] vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOV...
I assume just to leave the dentry in the same stat we originally found it This would work as well, yeah. I've no real preference, here... thanks- --
Jul 11, 6:15 pm 2008
Zach Brown
Re: [PATCH] vfs: fix vfs_rename_dir for FS_RENAME_DOES_D_MOV...
So we'd just come back through lookup to repopulate the existing destination name that vfs_rename_dir() unhashed before calling ->rename() in the case that the rename fails? That seems gross, but It'd work for my case, yeah. - z --
Jul 11, 6:12 pm 2008
previous daytodaynext day
July 10, 2008July 11, 2008July 12, 2008