[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120831172900.GC23464@ZenIV.linux.org.uk>
Date: Fri, 31 Aug 2012 18:29:00 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Namjae Jeon <linkinjeon@...il.com>
Cc: hirofumi@...l.parknet.co.jp, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org,
Amit Sahrawat <amit.sahrawat83@...il.com>
Subject: Re: [PATCH] fat: remove redundent call to fat_detach in vfat_unlink
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists