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.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -1533,6 +1533,7 @@ struct nfs_renamedata { · 1532 unmodified lines | |||
| 1533 | struct nfs_fattr new_fattr; | 1533 | struct nfs_fattr new_fattr; |
| 1534 | void (*complete)(struct rpc_task *, struct nfs_renamedata *); | 1534 | void (*complete)(struct rpc_task *, struct nfs_renamedata *); |
| 1535 | long timeout; | 1535 | long timeout; |
| 1536 | bool cancelled; | ||
| 1536 | }; | 1537 | }; |
| 1537 | 1538 | ||
| 1538 | struct nfs_access_entry; | 1539 | struct nfs_access_entry; |