Whamcloud - gitweb
Branch HEAD
authorliuy <liuy>
Thu, 13 Sep 2007 02:29:24 +0000 (02:29 +0000)
committerliuy <liuy>
Thu, 13 Sep 2007 02:29:24 +0000 (02:29 +0000)
b=2369
i=johann, deen

replace inode->i_size access with i_size_read/write

lnet/include/libcfs/linux/linux-fs.h
lnet/klnds/mxlnd/mxlnd.c

index 3ba5461..ced39b8 100644 (file)
@@ -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)
 
 /* 
index d4287ba..34dbf5e 100644 (file)
@@ -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);