From: Christoph Hellwig Subject: [PATCH] fat: make sure to set d_ops in fat_get_parent Date: Tue, 11 Nov 2008 19:51:23 +0100 Message-ID: <20081111185123.GA11861@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: hirofumi@mail.parknet.co.jp Return-path: Received: from verein.lst.de ([213.95.11.210]:40600 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750889AbYKKSva (ORCPT ); Tue, 11 Nov 2008 13:51:30 -0500 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: fat_get_parent needs to setup the dentry operations, otherwise we might lose them when the NFS server needs to reconnect out of cache inodes. Signed-off-by: Christoph Hellwig Index: linux-2.6/fs/fat/inode.c =================================================================== --- linux-2.6.orig/fs/fat/inode.c 2008-11-08 10:47:12.000000000 +0100 +++ linux-2.6/fs/fat/inode.c 2008-11-08 12:16:18.000000000 +0100 @@ -749,6 +749,8 @@ static struct dentry *fat_get_parent(str brelse(bh); parent = d_obtain_alias(inode); + if (!IS_ERR(parent)) + parent->d_op = sb->s_root->d_op; out: unlock_super(sb);