Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1341603 > unrolled thread

[PATCH] s390x: fix condition to choose correct function

Started byYadan Fan <ydfan@suse.com>
First post2016-02-24 07:50 +0100
Last post2016-02-29 05:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] s390x: fix condition to choose correct function Yadan Fan <ydfan@suse.com> - 2016-02-24 07:50 +0100
    Re: [PATCH] s390x: fix condition to choose correct function Steve French <smfrench@gmail.com> - 2016-02-29 05:20 +0100

#1341603 — [PATCH] s390x: fix condition to choose correct function

FromYadan Fan <ydfan@suse.com>
Date2016-02-24 07:50 +0100
Subject[PATCH] s390x: fix condition to choose correct function
Message-ID<r5BqN-zv-1@gated-at.bofh.it>
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 <ydfan@suse.com>
---
 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)
 {
-- 
2.6.2

[toc] | [next] | [standalone]


#1345458

FromSteve French <smfrench@gmail.com>
Date2016-02-29 05:20 +0100
Message-ID<r7nto-5bT-3@gated-at.bofh.it>
In reply to#1341603
merged into cifs-2.6.git

Looks like alpha has a similar problem though

On Wed, Feb 24, 2016 at 12:45 AM, Yadan Fan <ydfan@suse.com> wrote:
> 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 <ydfan@suse.com>
> ---
>  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)
>  {
> --
> 2.6.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web