diff options
-rw-r--r-- | fs/nfs/unlink.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index 818ded7b7b74..de54129336c6 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
16 | #include <linux/namei.h> | 16 | #include <linux/namei.h> |
17 | #include <linux/fsnotify.h> | ||
17 | 18 | ||
18 | #include "internal.h" | 19 | #include "internal.h" |
19 | #include "nfs4_fs.h" | 20 | #include "nfs4_fs.h" |
@@ -465,8 +466,18 @@ nfs_async_rename(struct inode *old_dir, struct inode *new_dir, | |||
465 | static void | 466 | static void |
466 | nfs_complete_sillyrename(struct rpc_task *task, struct nfs_renamedata *data) | 467 | nfs_complete_sillyrename(struct rpc_task *task, struct nfs_renamedata *data) |
467 | { | 468 | { |
468 | if (task->tk_status != 0) | 469 | struct dentry *dentry = data->old_dentry; |
469 | nfs_cancel_async_unlink(data->old_dentry); | 470 | |
471 | if (task->tk_status != 0) { | ||
472 | nfs_cancel_async_unlink(dentry); | ||
473 | return; | ||
474 | } | ||
475 | |||
476 | /* | ||
477 | * vfs_unlink and the like do not issue this when a file is | ||
478 | * sillyrenamed, so do it here. | ||
479 | */ | ||
480 | fsnotify_nameremove(dentry, 0); | ||
470 | } | 481 | } |
471 | 482 | ||
472 | #define SILLYNAME_PREFIX ".nfs" | 483 | #define SILLYNAME_PREFIX ".nfs" |