Commit 12127498 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

nfsd warning fix

gcc-4.3:

fs/nfsd/nfsctl.c: In function 'write_getfs':
fs/nfsd/nfsctl.c:248: warning: cast from pointer to integer of different size

Cc: Neil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 019ab801
...@@ -245,7 +245,7 @@ static ssize_t write_getfs(struct file *file, char *buf, size_t size) ...@@ -245,7 +245,7 @@ static ssize_t write_getfs(struct file *file, char *buf, size_t size)
} }
exp_readunlock(); exp_readunlock();
if (err == 0) if (err == 0)
err = res->fh_size + (int)&((struct knfsd_fh*)0)->fh_base; err = res->fh_size + offsetof(struct knfsd_fh, fh_base);
out: out:
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment