From patchwork Fri Nov 19 02:18:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 338241 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAJ2RovU012005 for ; Fri, 19 Nov 2010 02:27:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751213Ab0KSC1e (ORCPT ); Thu, 18 Nov 2010 21:27:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1212 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173Ab0KSC1e (ORCPT ); Thu, 18 Nov 2010 21:27:34 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAJ2RXr8014276 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Nov 2010 21:27:33 -0500 Received: from localhost.localdomain (test1244.test.redhat.com [10.10.10.244]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAJ2RWDU003065 for ; Thu, 18 Nov 2010 21:27:33 -0500 From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: fix more ESTALE problems with NFS Date: Thu, 18 Nov 2010 21:18:02 -0500 Message-Id: <1290133082-3788-1-git-send-email-josef@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 19 Nov 2010 02:27:50 +0000 (UTC) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 6f08892..3018878 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4502,6 +4502,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, BTRFS_I(inode)->index_cnt = 2; BTRFS_I(inode)->root = root; BTRFS_I(inode)->generation = trans->transid; + inode->i_generation = BTRFS_I(inode)->generation; btrfs_set_inode_space_info(root, inode); if (mode & S_IFDIR)