Re: [RFC PATCH 05/13] vfs: take i_mutex on renamed file

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

 



On Mon, Sep 10, 2012 at 01:10:37PM +0800, Ram Pai wrote:
> On Mon, Sep 10, 2012 at 10:40:51AM +0800, Guo Chao wrote:
> > 
> > Hard to say whether it's a bug or what's problems of being able to rename 
> > mountpoint.
> 
> 'man 2 rename' says it is ok to rename a directory that is already
> mounted.
> 
> EBUSY The rename fails because oldpath or newpath is a directory that is
> in use by some process (perhaps as current working directory, or as root
> directory, or beacuse it was open for reading) or is in use by the
> system (for example as mount point), while the system considers this an
> error. (Note that there is no requirement to return EBUSY in such
> cases-- there is nothing wrong with doing the rename anyway -- but is
> 	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> allowed to return EBUSY if the system cannot otherwise handle such
> situations)
> 
> RP

Erhh, good point. 

However, current implementation seems to return EBUSY unconditionally, 
instead of considering whether it can handle this situation. It can be 
descripted as 'it may return EBUSY or not, depends on whether you are 
luck enough to rush into the race'.

This seems still conform to the statement in the manual, in a weird way 
though.


--
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