From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH] shmem: fix nlink for rename overwrite directory Date: Wed, 24 Sep 2014 19:58:49 +0100 Message-ID: <20140924185849.GD7996@ZenIV.linux.org.uk> References: <20140924155617.GD7441@tucsk.piliscsaba.szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Hugh Dickins , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: <20140924155617.GD7441@tucsk.piliscsaba.szeredi.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Sep 24, 2014 at 05:56:17PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > If overwriting an empty directory with rename, then need to drop the extra > nlink. Hmm... OK, point. It doesn't actually check for ->i_nlink for directories, and it only affects the sucker while it (a directory) is opened-but-rmdired, but yes, it's visible to userland, so... Applied.