Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752895AbbEKINP (ORCPT ); Mon, 11 May 2015 04:13:15 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60208 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751435AbbEKINM (ORCPT ); Mon, 11 May 2015 04:13:12 -0400 Date: Mon, 11 May 2015 10:13:09 +0200 From: David Sterba To: NeilBrown Cc: Josef Bacik , Chris Mason , Jan Kara , Ryusuke Konishi , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH 1/3] BTRFS: support NFSv2 export Message-ID: <20150511081309.GI23255@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, NeilBrown , Josef Bacik , Chris Mason , Jan Kara , Ryusuke Konishi , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org References: <20150508001142.31129.7604.stgit@notabene.brown> <20150508001623.31129.91695.stgit@notabene.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150508001623.31129.91695.stgit@notabene.brown> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 706 Lines: 18 On Fri, May 08, 2015 at 10:16:23AM +1000, NeilBrown wrote: > The "fh_len" passed to ->fh_to_* is not guaranteed to be that same as > that returned by encode_fh - it may be larger. > > With NFSv2, the filehandle is fixed length, so it may appear longer > than expected and be zero-padded. > > So we must test that fh_len is at least some value, not exactly equal > to it. > > Signed-off-by: NeilBrown Acked-by: David Sterba -- 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/