| From | Subject | Date |
|---|---|---|
| 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 day | today | next day |
|---|---|---|
| July 10, 2008 | July 11, 2008 | July 12, 2008 |
| Ian Campbell | Re: [PATCH] x86: Construct 32 bit boot time page tables in native format. |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Justin Piszcz | Linux Software RAID 5 Performance Optimizations: 2.6.19.1: (211MB/s read & 195... |
| Alan | Re: [RFC] Heads up on sys_fallocate() |
| Matthias Scheler | Re: HEADS UP: timecounters (branch simonb-timecounters) merged into -current |
| David Laight | long usernames |
| Quentin Garnier | Re: Understanding foo_open, foo_read, etc. |
| Jared D. McNeill | Breaking binary compatibility for /dev/joy |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
