From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f196.google.com ([209.85.161.196]:43709 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbeG3Gmb (ORCPT ); Mon, 30 Jul 2018 02:42:31 -0400 MIME-Version: 1.0 In-Reply-To: <20180729220453.13431-3-viro@ZenIV.linux.org.uk> References: <20180729220317.GB30522@ZenIV.linux.org.uk> <20180729220453.13431-1-viro@ZenIV.linux.org.uk> <20180729220453.13431-3-viro@ZenIV.linux.org.uk> From: Amir Goldstein Date: Mon, 30 Jul 2018 08:09:19 +0300 Message-ID: Subject: Re: [PATCH 03/16] vfs: don't evict uninitialized inode To: Al Viro Cc: linux-fsdevel , Linus Torvalds , linux-kernel , Miklos Szeredi , Greg KH Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jul 30, 2018 at 1:04 AM, Al Viro wrote: > From: Miklos Szeredi > > iput() ends up calling ->evict() on new inode, which is not yet initialized > by owning fs. So use destroy_inode() instead. > > Add to sb->s_inodes list only if inode is not in I_CREATING state (meaning > that it wasn't allocated with new_inode(), which already does the > insertion). > > Reported-by: Al Viro > Signed-off-by: Miklos Szeredi > Fixes: 80ea09a002bf ("vfs: factor out inode_insert5()") Backport hint: this patch depends on the patch ("new primitive: discard_new_inode()") currently commit 22dc9a168272 in Al's for-next. Still trying to figure out the best format to channel this information to stable maintainers... Thanks, Amir.