Skip to contentSkip to conversation

elementary d_move question

DISCUSSION J. Bruce Fields 1 participant 1 message Oct 23, 2013 VFS

lore
Share & tools
lore
#0 lore raw

(Bah, apologies, I messed up the list cc. Resending in case it's useful to have the answer in the archives.)

Quoted 27 lines · J. Bruce Fields
Quoted 8 lines · Al Viro
Quoted 6 lines · J. Bruce Fields

The rename does a d_move(dentry, target) where I assume dentry is for "foo" and target for "bar", with target the same dentry that the file descriptor holds a reference on.

But d_move() does

Quoted 8 lines
Quoted 1 line
	switch_names(dentry, target);

Yes

Quoted 1 line

giving target name "foo"

Not really. Check what it does when both names are inline ones (i.e. shorter than 32 characters and stored in struct dentry itself)...

Doh--got it, thanks!

I have a feeling I've gotten lost here before.

I assume it's just never seemed worth the trouble to make the readlink string more consistent given that its value's not really well-defined anyway, OK.

--b.