Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934315AbXICChy (ORCPT ); Sun, 2 Sep 2007 22:37:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932429AbXICC0X (ORCPT ); Sun, 2 Sep 2007 22:26:23 -0400 Received: from filer.fsl.cs.sunysb.edu ([130.245.126.2]:57757 "EHLO filer.fsl.cs.sunysb.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932439AbXICCZ4 (ORCPT ); Sun, 2 Sep 2007 22:25:56 -0400 From: "Josef 'Jeff' Sipek" To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, viro@ftp.linux.org.uk, bharata@linux.vnet.ibm.com, j.blunck@tu-harburg.de, Erez Zadok , "Josef 'Jeff' Sipek" Subject: [PATCH 19/32] Unionfs: partial_lookup update Date: Sun, 2 Sep 2007 22:20:42 -0400 Message-Id: <11887860581524-git-send-email-jsipek@cs.sunysb.edu> X-Mailer: git-send-email 1.5.2.2.238.g7cbf2f2 In-Reply-To: <1188786055371-git-send-email-jsipek@cs.sunysb.edu> References: <1188786055371-git-send-email-jsipek@cs.sunysb.edu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1493 Lines: 59 From: Erez Zadok Handle new semantics of lookup_backend. Signed-off-by: Erez Zadok Signed-off-by: Josef 'Jeff' Sipek --- fs/unionfs/lookup.c | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c index e4e8470..d05daa5 100644 --- a/fs/unionfs/lookup.c +++ b/fs/unionfs/lookup.c @@ -425,20 +425,30 @@ out: return ERR_PTR(err); } -/* This is a utility function that fills in a unionfs dentry */ +/* + * This is a utility function that fills in a unionfs dentry. + * + * Returns: 0 (ok), or -ERRNO if an error occurred. + */ int unionfs_partial_lookup(struct dentry *dentry) { struct dentry *tmp; struct nameidata nd = { .flags = 0 }; + int err = -ENOSYS; tmp = unionfs_lookup_backend(dentry, &nd, INTERPOSE_PARTIAL); - if (!tmp) - return 0; - if (IS_ERR(tmp)) - return PTR_ERR(tmp); + if (!tmp) { + err = 0; + goto out; + } + if (IS_ERR(tmp)) { + err = PTR_ERR(tmp); + goto out; + } /* need to change the interface */ BUG_ON(tmp != dentry); - return -ENOSYS; +out: + return err; } /* The dentry cache is just so we have properly sized dentries. */ -- 1.5.2.2.238.g7cbf2f2 - 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/