Whamcloud - gitweb
- fixed stupid bug with locking in MDS. It caused clients do not flush local
[fs/lustre-release.git] / lustre / lvfs / fsfilt_smfs.c
index 9661a6a..b64cf91 100644 (file)
@@ -76,8 +76,7 @@ static void *fsfilt_smfs_brw_start(int objcount, struct fsfilt_objinfo *fso,
                 return NULL;
 
         cache_inode = I2CI(fso->fso_dentry->d_inode);
-        cache_dentry = pre_smfs_dentry(NULL, cache_inode, fso->fso_dentry, 
-                                       NULL);
+        cache_dentry = pre_smfs_dentry(NULL, cache_inode, fso->fso_dentry);
 
         if (!cache_dentry)
                 GOTO(exit, rc = ERR_PTR(-ENOMEM));
@@ -171,7 +170,7 @@ static int fsfilt_smfs_setattr(struct dentry *dentry, void *handle,
 
         cache_inode = I2CI(dentry->d_inode);
 
-        cache_dentry = pre_smfs_dentry(NULL, cache_inode, dentry, NULL);
+        cache_dentry = pre_smfs_dentry(NULL, cache_inode, dentry);
         if (!cache_dentry)
                 GOTO(exit, rc = -ENOMEM);
 
@@ -232,11 +231,11 @@ static int fsfilt_smfs_iocontrol(struct inode *inode, struct file *file,
         } else {
                 rc = cache_fsfilt->fs_iocontrol(cache_inode, NULL, cmd, arg);
         }
-
+#if 0
         /* FIXME-UMKA: Should this be in duplicate_inode()? */
         if (rc == 0 && cmd == EXT3_IOC_SETFLAGS)
                 inode->i_flags = cache_inode->i_flags;
-
+#endif
         post_smfs_inode(inode, cache_inode);
 
         RETURN(rc);
@@ -302,11 +301,7 @@ static int fsfilt_smfs_get_md(struct inode *inode, void *lmm, int lmm_size)
         RETURN(rc);
 }
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-static int fsfilt_smfs_send_bio(struct inode *inode, struct bio *bio)
-#else
-static int fsfilt_smfs_send_bio(struct inode *inode, struct kiobuf *bio)
-#endif
+static int fsfilt_smfs_send_bio(int rw, struct inode *inode, struct kiobuf *bio)
 {
         struct inode *cache_inode;
         struct fsfilt_operations *cache_fsfilt;
@@ -322,7 +317,7 @@ static int fsfilt_smfs_send_bio(struct inode *inode, struct kiobuf *bio)
         if (!cache_fsfilt->fs_send_bio)
                 RETURN(-ENOSYS);
 
-        return cache_fsfilt->fs_send_bio(cache_inode, bio);
+        return cache_fsfilt->fs_send_bio(rw, cache_inode, bio);
 }
 
 static struct page *
@@ -989,7 +984,7 @@ static int fsfilt_smfs_do_write_cow(struct dentry *de, void *extents,
         for (i = 0; i < num_extents; i++) {
                size_t count = w_ext->w_count;
                loff_t off = w_ext->w_pos;
-               rc = smfs_cow_write(de->d_inode, de, &count, &off);
+               rc = smfs_cow_write_pre(de->d_inode, de, &count, &off);
                if (rc)
                         RETURN(rc);  
                w_ext ++;