Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757073AbbKRVKN (ORCPT ); Wed, 18 Nov 2015 16:10:13 -0500 Received: from mail-oi0-f43.google.com ([209.85.218.43]:35872 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756993AbbKRVKL (ORCPT ); Wed, 18 Nov 2015 16:10:11 -0500 MIME-Version: 1.0 Reply-To: rajatxjain@gmail.com In-Reply-To: <20151118210615.GE22011@ZenIV.linux.org.uk> References: <20151113063103.GO22011@ZenIV.linux.org.uk> <20151118210615.GE22011@ZenIV.linux.org.uk> Date: Wed, 18 Nov 2015 13:10:10 -0800 Message-ID: Subject: Re: Anonymous inode cleanup? From: Rajat Jain To: Al Viro Cc: linux-fsdevel@vger.kernel.org, Davide Libenzi , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 966 Lines: 25 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); module_put(fops->owner); On Wed, Nov 18, 2015 at 1:06 PM, Al Viro wrote: > On Wed, Nov 18, 2015 at 12:28:38PM -0800, Rajat Jain wrote: > >> > _If_ you are returning them via a sucky API, the right sequence is >> > reserve the descriptor(s) >> > set the file(s) up >> > fill whatever structure you'll be using to report descriptors to >> > userland and copy it to userland memory >> >> If this step fails, what is the cleanup needed for "set the files up" >> anon_inode_getfile() step? is it fput()? > > Yes. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/