Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / lvfs / fsfilt_reiserfs.c
index 3441c96..83c3022 100644 (file)
 #include <linux/pagemap.h>
 #include <linux/quotaops.h>
 #include <linux/version.h>
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 #include <linux/init.h>
 #include <asm/statfs.h>
-#endif
 #include <libcfs/kp30.h>
 #include <lustre_fsfilt.h>
 #include <obd.h>
-#include <obd_class.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -96,7 +93,7 @@ static int fsfilt_reiserfs_setattr(struct dentry *dentry, void *handle,
         if (iattr->ia_valid & ATTR_SIZE && !do_trunc) {
                 /* ATTR_SIZE would invoke truncate: clear it */
                 iattr->ia_valid &= ~ATTR_SIZE;
-                inode->i_size = iattr->ia_size;
+                i_size_write(inode, iattr->ia_size);
 
                 /* make sure _something_ gets set - so new inode
                  * goes to disk (probably won't work over XFS
@@ -137,7 +134,7 @@ static int fsfilt_reiserfs_get_md(struct inode *inode, void *lmm, int lmm_size,
                                   const char *name)
 {
         if (lmm == NULL)
-                return inode->i_size;
+                return i_size_read(inode);
 
         CERROR("not implemented yet\n");
         return -ENOSYS;
@@ -172,7 +169,9 @@ static int fsfilt_reiserfs_statfs(struct super_block *sb,
         int rc;
 
         memset(&sfs, 0, sizeof(sfs));
+
         rc = ll_do_statfs(sb, &sfs);
+
         statfs_pack(osfs, &sfs);
         return rc;
 }