From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 18 Nov 2015 21:24:27 +0000 From: Al Viro To: Rajat Jain Cc: linux-fsdevel@vger.kernel.org, Davide Libenzi , "linux-kernel@vger.kernel.org" Subject: Re: Anonymous inode cleanup? Message-ID: <20151118212427.GF22011@ZenIV.linux.org.uk> References: <20151113063103.GO22011@ZenIV.linux.org.uk> <20151118210615.GE22011@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: On Wed, Nov 18, 2015 at 01:10:10PM -0800, Rajat Jain wrote: > I see reference taken for the path and module in anon_inode_getfile() > > Don't I need to drop that, or would fput() do it for me? > > path_put(&path); dput(dentry); mntput(mnt); in the very end of __fput() > module_put(fops->owner); fops_put(file->f_op); slightly earlier in the same function.