From patchwork Fri Oct 16 20:47:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 54414 Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9GKm9kJ030142 for ; Fri, 16 Oct 2009 20:48:09 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 29B52AD2D2; Fri, 16 Oct 2009 14:46:56 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.8 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by lists.samba.org (Postfix) with ESMTP id CC013AD2CC for ; Fri, 16 Oct 2009 14:46:50 -0600 (MDT) Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9GKm10Q005515; Fri, 16 Oct 2009 16:48:01 -0400 Received: from tlielax.poochiereds.net (vpn-10-230.rdu.redhat.com [10.11.10.230]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9GKm0Z4012709; Fri, 16 Oct 2009 16:48:01 -0400 Date: Fri, 16 Oct 2009 16:47:59 -0400 From: Jeff Layton To: Timothy Normand Miller Message-ID: <20091016164759.5bf12da8@tlielax.poochiereds.net> In-Reply-To: <20091016161243.20a52a0c@tlielax.poochiereds.net> References: <9871ee5f0910152224y6a9e1afcu262259b921d46d51@mail.gmail.com> <20091016085918.4dd65ed1@tlielax.poochiereds.net> <9871ee5f0910160732v4ac835dar29c214d8f198425c@mail.gmail.com> <20091016105007.201f729a@tlielax.poochiereds.net> <9871ee5f0910160835g2b39a2e9n74ec45aed8e67b54@mail.gmail.com> <20091016114354.7ddbcf3c@tlielax.poochiereds.net> <9871ee5f0910160906r2071ca3ds47fda6e8ad303863@mail.gmail.com> <20091016144956.2c8379cf@tlielax.poochiereds.net> <20091016161243.20a52a0c@tlielax.poochiereds.net> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Cc: linux-cifs-client@lists.samba.org Subject: Re: [linux-cifs-client] Can't mount smb shares using mount.cifs with 2.6.31 kernel X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org From 87f412fa02c9a0ba3eedf964f08efaa67f61edaa Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 16 Oct 2009 16:42:23 -0400 Subject: [PATCH] cifs: fix server returning zeroed out FileID's in SMB_FIND_FILE_ID_FULL_DIR_INFO It's possible that a server will return a valid FileID when we query the FILE_INTERNAL_INFO for the root inode, but then zeroed out inode numbers when we do a FindFile with an infolevel of SMB_FIND_FILE_ID_FULL_DIR_INFO. In this situation turn off querying for server inode numbers, and just generate an inode number using iunique. Reported-by: Timothy Normand Miller Signed-off-by: Jeff Layton --- fs/cifs/readdir.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 1f098ca..bafef8b 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -727,11 +727,13 @@ static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, cifs_dir_info_to_fattr(&fattr, (FILE_DIRECTORY_INFO *) pfindEntry, cifs_sb); - /* FIXME: make _to_fattr functions fill this out */ - if (pCifsF->srch_inf.info_level == SMB_FIND_FILE_ID_FULL_DIR_INFO) + if (inum) { fattr.cf_uniqueid = inum; - else + } else { fattr.cf_uniqueid = iunique(sb, ROOT_I); + if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) + cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; + } ino = cifs_uniqueid_to_ino_t(fattr.cf_uniqueid); tmp_dentry = cifs_readdir_lookup(file->f_dentry, &qstring, &fattr); -- 1.6.0.6