linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fat: remove redundent call to fat_detach in vfat_unlink
@ 2012-08-31 16:48 Namjae Jeon
  2012-08-31 17:29 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Namjae Jeon @ 2012-08-31 16:48 UTC (permalink / raw)
  To: hirofumi, akpm; +Cc: linux-kernel, Namjae Jeon, Amit Sahrawat

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

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
---
 fs/fat/namei_vfat.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index e535dd7..37be82e 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -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);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fat: remove redundent call to fat_detach in vfat_unlink
  2012-08-31 16:48 [PATCH] fat: remove redundent call to fat_detach in vfat_unlink Namjae Jeon
@ 2012-08-31 17:29 ` Al Viro
  2012-09-03  6:08   ` Namjae Jeon
  0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2012-08-31 17:29 UTC (permalink / raw)
  To: Namjae Jeon; +Cc: hirofumi, akpm, linux-kernel, Amit Sahrawat

On Fri, Aug 31, 2012 at 12:48:07PM -0400, Namjae Jeon wrote:
> 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

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fat: remove redundent call to fat_detach in vfat_unlink
  2012-08-31 17:29 ` Al Viro
@ 2012-09-03  6:08   ` Namjae Jeon
  0 siblings, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2012-09-03  6:08 UTC (permalink / raw)
  To: Al Viro; +Cc: hirofumi, akpm, linux-kernel, Amit Sahrawat

2012/9/1, Al Viro <viro@zeniv.linux.org.uk>:
> On Fri, Aug 31, 2012 at 12:48:07PM -0400, Namjae Jeon wrote:
>> 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
>
> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-03  6:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 16:48 [PATCH] fat: remove redundent call to fat_detach in vfat_unlink Namjae Jeon
2012-08-31 17:29 ` Al Viro
2012-09-03  6:08   ` Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).