fat: remove redundent call to fat_detach in vfat_unlink
PATCH 1/1 fat: remove redundent call to fat_detach in vfat_unlink
As after file is removed fat_evict_inode will be called and fat_detach will be called from that place. So, fat_detach can be removed from vfat_unlink
--- fs/fat/namei_vfat.c | 1 - 1 file changed, 1 deletion(-)
fs/fat/namei_vfat.c +0 -1
@@ -852,7 +852,6 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry) goto out;clear_nlink (inode); inode->i_mtime = inode->i_atime =CURRENT_TIME_SEC ; -fat_detach (inode); out:unlock_super (sb);
Signature · 1 line
1.7.9.5
Quoted 1 line · Namjae Jeon
As after file is removed
fat_evict_inodewill be called andfat_detachwill be called from that place. So,fat_detachcan be removed fromvfat_unlink
NAK. Please, realize that unlink and destruction of file are separate operations. ->evict_inode() may be called long after ->unlink(); moreover, during that time you might have another file created, getting the same directory entry our file used to have.
This is Unix, damnit. You *can* open file, then unlink it and that file will keep existing (i.e. you can write to that descriptor, read, etc.) until it's closed.
2012/9/1, Al Viro <[email protected]>:
Quoted 5 lines · Namjae Jeon
Quoted 3 lines
As after file is removed
fat_evict_inodewill be called andfat_detachwill be called from that place. So,fat_detachcan be removed fromvfat_unlink
Quoted 9 lines
NAK. Please, realize that unlink and destruction of file are separate operations. ->evict_inode() may be called long after ->unlink(); moreover, during that time you might have another file created, getting the same directory entry our file used to have.
This is Unix, damnit. You *can* open file, then unlink it and that file will keep existing (i.e. you can write to that descriptor, read, etc.) until it's closed.
Hi Al.
Sorry for noise. I understand what you said.
There was some confusing to me while checking fat's estale issue.:) I will re-post patch-set about fat estale issue soon.(fix side-effect informed by you and ogawa)
I am grateful that you review these patches also if you have time. Thanks.