projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12f44f4
)
NFS: Drop inode after rename
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 25 Aug 2005 23:25:34 +0000
(16:25 -0700)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Fri, 23 Sep 2005 16:37:58 +0000
(12:37 -0400)
When doing a rename on top of an existing file that is not in use,
the inode of the overwritten file will remain in the icache.
The fix is to decrement i_nlink of the overwritten inode, like we
do for unlink, rmdir etc already.
Problem diagnosed by Olaf Kirch. This patch is a slight variation
on his fix.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/dir.c
b/fs/nfs/dir.c
index 2df639f143e8065cdd647044a4283e28fe89d092..94a7fcee0624666b655a87420aaf17b6675e3c15 100644
(file)
--- a/
fs/nfs/dir.c
+++ b/
fs/nfs/dir.c
@@
-1539,7
+1539,8
@@
static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
#endif
goto out;
}
- }
+ } else
+ new_inode->i_nlink--;
go_ahead:
/*