elementary d_move question

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

 



If I rename foo over bar, while holding bar open, then
/proc/<pid>/fd/<fd> still shows me bar's old path:

	$ touch foo bar
	$ tail -f bar &
	[1] 23492
	$ mv foo bar
	$ readlink /proc/23492/fd/3
	/home/bfields/bar (deleted)

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

	switch_names(dentry, target);

giving target name "foo".  So how does readlink still get "bar"?

I've clearly missed something obvious....

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux