]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: nfs_rename() - revalidate directories on -ERESTARTSYS
authorBenjamin Coddington <bcodding@redhat.com>
Fri, 16 Jun 2017 15:13:00 +0000 (11:13 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 19:58:04 +0000 (15:58 -0400)
commit0fe4a857004409791da5374a17f7e9d8ec8e098c
tree153d8c114f65a8fb5d8c01dea04189db01a8351d
parent5a75e91fef8dff318623591b93af5b8fa956f607
NFS: nfs_rename() - revalidate directories on -ERESTARTSYS

An interrupted rename will leave the old dentry behind if the rename
succeeds.  Fix this by forcing a lookup the next time through
->d_revalidate.

A previous attempt at solving this problem took the approach to complete
the work of the rename asynchronously, however that approach was wrong
since it would allow the d_move() to occur after the directory's i_mutex
had been dropped by the original process.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c
fs/nfs/unlink.c
include/linux/nfs_xdr.h