From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f178.google.com ([209.85.223.178]:35820 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753214AbbLLAiQ (ORCPT ); Fri, 11 Dec 2015 19:38:16 -0500 Received: by ioc74 with SMTP id 74so143633924ioc.2 for ; Fri, 11 Dec 2015 16:38:16 -0800 (PST) Date: Fri, 11 Dec 2015 18:38:13 -0600 From: Eric Biggers To: pavi1729 Cc: linux-fsdevel@vger.kernel.org Subject: Re: Query on freeing of new_fdt->open_fds in file.c Message-ID: <20151212003813.GA889@zzz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Dec 11, 2015 at 05:21:40PM +0530, pavi1729 wrote: > Hi, > I am unable to understand how > > new_fdt->open_fds can be freed in __free_fdtable when its an > unsigned long in files_struct ? The 'struct fdtable' is either embedded in the files_struct (if there are few file descriptors) or allocated separately (if there are many file descriptors). __free_fdtable() is only ever called if the 'struct fdtable' is *not* embedded.