Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932255AbVJGLWn (ORCPT ); Fri, 7 Oct 2005 07:22:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932368AbVJGLWn (ORCPT ); Fri, 7 Oct 2005 07:22:43 -0400 Received: from 223-177.adsl.pool.ew.hu ([193.226.223.177]:32271 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S932255AbVJGLWn (ORCPT ); Fri, 7 Oct 2005 07:22:43 -0400 To: akpm@osdl.org CC: viro@ftp.linux.org.uk, trond.myklebust@fys.uio.no, linux-kernel@vger.kernel.org Subject: [PATCH] nfs: don't drop dentry in d_revalidate Message-Id: From: Miklos Szeredi Date: Fri, 07 Oct 2005 13:21:01 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 31 NFS d_revalidate() is doing things that are supposed to be done by d_invalidate(). Dropping the dentry is especially bad, since it will make d_invalidate() bypass all checks. Signed-off-by: Miklos Szeredi --- Index: linux/fs/nfs/dir.c =================================================================== --- linux.orig/fs/nfs/dir.c 2005-10-04 13:59:57.000000000 +0200 +++ linux/fs/nfs/dir.c 2005-10-07 12:53:45.000000000 +0200 @@ -762,12 +762,7 @@ out_zap_parent: if (inode && S_ISDIR(inode->i_mode)) { /* Purge readdir caches. */ nfs_zap_caches(inode); - /* If we have submounts, don't unhash ! */ - if (have_submounts(dentry)) - goto out_valid; - shrink_dcache_parent(dentry); } - d_drop(dentry); unlock_kernel(); dput(parent); return 0; - 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/