From 2371e317a0384e5a57049d08f67d5be06970b1ee Mon Sep 17 00:00:00 2001 From: liuy Date: Thu, 13 Sep 2007 02:29:24 +0000 Subject: [PATCH] Branch HEAD b=2369 i=johann, deen replace inode->i_size access with i_size_read/write --- lnet/include/libcfs/linux/linux-fs.h | 2 +- lnet/klnds/mxlnd/mxlnd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lnet/include/libcfs/linux/linux-fs.h b/lnet/include/libcfs/linux/linux-fs.h index 3ba5461..ced39b8a 100644 --- a/lnet/include/libcfs/linux/linux-fs.h +++ b/lnet/include/libcfs/linux/linux-fs.h @@ -48,7 +48,7 @@ typedef struct file cfs_file_t; typedef struct dentry cfs_dentry_t; #ifdef __KERNEL__ -#define cfs_filp_size(f) ((f)->f_dentry->d_inode->i_size) +#define cfs_filp_size(f) (i_size_read((f)->f_dentry->d_inode)) #define cfs_filp_poff(f) (&(f)->f_pos) /* diff --git a/lnet/klnds/mxlnd/mxlnd.c b/lnet/klnds/mxlnd/mxlnd.c index d4287ba..34dbf5e 100644 --- a/lnet/klnds/mxlnd/mxlnd.c +++ b/lnet/klnds/mxlnd/mxlnd.c @@ -446,7 +446,7 @@ mxlnd_parse_hosts(char *filename) return -1; } - size = (s32) filp->f_dentry->d_inode->i_size; + size = (s32) cfs_filp_size(filp); if (size < MXLND_BUFSIZE) bufsize = size; allocd = bufsize; MXLND_ALLOC(buf, allocd + 1); -- 1.8.3.1