From patchwork Wed Feb 24 06:45:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yadan Fan X-Patchwork-Id: 8402101 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8D63C9F2F0 for ; Wed, 24 Feb 2016 06:47:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B419E202BE for ; Wed, 24 Feb 2016 06:47:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4881620274 for ; Wed, 24 Feb 2016 06:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756667AbcBXGrk (ORCPT ); Wed, 24 Feb 2016 01:47:40 -0500 Received: from victor.provo.novell.com ([137.65.250.26]:36090 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbcBXGrk (ORCPT ); Wed, 24 Feb 2016 01:47:40 -0500 Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (TLS encrypted); Tue, 23 Feb 2016 23:47:27 -0700 From: Yadan Fan To: sfrench@samba.org, linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, martin.schwidefsky@de.ibm.com, Yadan Fan Subject: [PATCH] s390x: fix condition to choose correct function Date: Wed, 24 Feb 2016 14:45:47 +0800 Message-Id: <1456296347-9665-1-git-send-email-ydfan@suse.com> X-Mailer: git-send-email 2.6.2 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This issue is involved from commit 02323db17e3a7 ("cifs: fix cifs_uniqueid_to_ino_t not to ever return 0"), when BITS_PER_LONG is 64 on s390x, the corresponding cifs_uniqueid_to_ino_t() function will cast 64-bit fileid to 32-bit by using (ino_t)fileid, because ino_t (typdefed __kernel_ino_t) is int type. Signed-off-by: Yadan Fan --- fs/cifs/cifsfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 68c4547..02dcbe1 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h @@ -31,7 +31,7 @@ * so that it will fit. We use hash_64 to convert the value to 31 bits, and * then add 1, to ensure that we don't end up with a 0 as the value. */ -#if BITS_PER_LONG == 64 +#if BITS_PER_LONG == 64 && !defined(CONFIG_S390) static inline ino_t cifs_uniqueid_to_ino_t(u64 fileid) {