* [PATCH] (updated) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in filei
@ 2010-12-02 17:58 Frank Filz
[not found] ` <1291312723.5075.25.camel-LVD8ZR29O+mrIzol8Bc5pA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Frank Filz @ 2010-12-02 17:58 UTC (permalink / raw)
To: NFS List; +Cc: ffilz
The problem was use of an int32, which when converted to a uint64
is sign extended resulting in a fileid that doesn't fit in 32 bits
even though the intent of the function is to fit the fileid into
32 bits.
Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
---
fs/nfs/inode.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 314f571..7fe18a0 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -89,7 +89,11 @@ int nfs_wait_bit_killable(void *word)
*/
u64 nfs_compat_user_ino64(u64 fileid)
{
- int ino;
+#ifdef CONIFG_COMPAT
+ compat_ulong_t ino;
+#else
+ unsigned long ino;
+#endif
if (enable_ino64)
return fileid;
--
1.5.5.6
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1291312723.5075.25.camel-LVD8ZR29O+mrIzol8Bc5pA@public.gmane.org>]
* Re: [PATCH] (updated) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in filei [not found] ` <1291312723.5075.25.camel-LVD8ZR29O+mrIzol8Bc5pA@public.gmane.org> @ 2010-12-02 18:11 ` Trond Myklebust [not found] ` <1291313468.3445.1.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Trond Myklebust @ 2010-12-02 18:11 UTC (permalink / raw) To: Frank Filz; +Cc: NFS List, ffilz On Thu, 2010-12-02 at 09:58 -0800, Frank Filz wrote: > The problem was use of an int32, which when converted to a uint64 > is sign extended resulting in a fileid that doesn't fit in 32 bits > even though the intent of the function is to fit the fileid into > 32 bits. > > Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com> > --- > fs/nfs/inode.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c > index 314f571..7fe18a0 100644 > --- a/fs/nfs/inode.c > +++ b/fs/nfs/inode.c > @@ -89,7 +89,11 @@ int nfs_wait_bit_killable(void *word) > */ > u64 nfs_compat_user_ino64(u64 fileid) > { > - int ino; > +#ifdef CONIFG_COMPAT ^^^^^^^ typo > + compat_ulong_t ino; > +#else > + unsigned long ino; > +#endif > > if (enable_ino64) > return fileid; -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@netapp.com www.netapp.com ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <1291313468.3445.1.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>]
* Re: [PATCH] (try3) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in fileid [not found] ` <1291313468.3445.1.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org> @ 2010-12-02 19:18 ` Frank Filz 0 siblings, 0 replies; 3+ messages in thread From: Frank Filz @ 2010-12-02 19:18 UTC (permalink / raw) To: Trond Myklebust, NFS List; +Cc: ffilz >From c501e5e10c5e5b63412c99b2b16f5978738f61c2 Mon Sep 17 00:00:00 2001 From: Frank S. Filz <ffilzlnx@us.ibm.com> Date: Thu, 2 Dec 2010 09:48:16 -0800 Subject: [PATCH] Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in fileid The problem was use of an int32, which when converted to a uint64 is sign extended resulting in a fileid that doesn't fit in 32 bits even though the intent of the function is to fit the fileid into 32 bits. Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com> --- fs/nfs/inode.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 314f571..bc0b938 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -89,7 +89,11 @@ int nfs_wait_bit_killable(void *word) */ u64 nfs_compat_user_ino64(u64 fileid) { - int ino; +#ifdef CONFIG_COMPAT + compat_ulong_t ino; +#else + unsigned long ino; +#endif if (enable_ino64) return fileid; -- 1.5.5.6 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-02 19:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02 17:58 [PATCH] (updated) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in filei Frank Filz
[not found] ` <1291312723.5075.25.camel-LVD8ZR29O+mrIzol8Bc5pA@public.gmane.org>
2010-12-02 18:11 ` Trond Myklebust
[not found] ` <1291313468.3445.1.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-12-02 19:18 ` [PATCH] (try3) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in fileid Frank Filz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).