From patchwork Tue Oct 5 10:33:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 231931 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 o95AYOcb028934 for ; Tue, 5 Oct 2010 10:34:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932864Ab0JEKdw (ORCPT ); Tue, 5 Oct 2010 06:33:52 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:42196 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932895Ab0JEKdu (ORCPT ); Tue, 5 Oct 2010 06:33:50 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp05.au.ibm.com (8.14.4/8.13.1) with ESMTP id o95AT6mU003412 for ; Tue, 5 Oct 2010 21:29:06 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o95AXm5L1667118 for ; Tue, 5 Oct 2010 21:33:48 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o95AXmQI006091 for ; Tue, 5 Oct 2010 21:33:48 +1100 Received: from localhost.localdomain ([9.77.201.212]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o95AXi6M006040; Tue, 5 Oct 2010 21:33:46 +1100 From: "Aneesh Kumar K.V" To: ceph-devel@vger.kernel.org, sage@newdream.net Cc: "Aneesh Kumar K.V" Subject: [PATCH 2/2] ceph: Update max_len with minimum required size Date: Tue, 5 Oct 2010 16:03:42 +0530 Message-Id: <1286274822-27738-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286274822-27738-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1286274822-27738-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@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]); Tue, 05 Oct 2010 10:34:44 +0000 (UTC) diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 387c582..e38423e 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c @@ -62,13 +62,16 @@ static int ceph_encode_fh(struct dentry *dentry, u32 *rawfh, int *max_len, *max_len = connected_handle_length; type = 2; } else if (*max_len >= handle_length) { - if (connectable) + if (connectable) { + *max_len = connected_handle_length; return 255; + } dout("encode_fh %p\n", dentry); fh->ino = ceph_ino(dentry->d_inode); *max_len = handle_length; type = 1; } else { + *max_len = handle_length; return 255; } return type;