]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/coda/file.c
add a vfs_fsync helper
[mirror_ubuntu-artful-kernel.git] / fs / coda / file.c
index 466303db2df6acbd11e047338b00739408fa428d..6a347fbc998a4cc3a23f60d3d2e91854db4206b2 100644 (file)
@@ -201,8 +201,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
 int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
 {
        struct file *host_file;
-       struct dentry *host_dentry;
-       struct inode *host_inode, *coda_inode = coda_dentry->d_inode;
+       struct inode *coda_inode = coda_dentry->d_inode;
        struct coda_file_info *cfi;
        int err = 0;
 
@@ -214,14 +213,7 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
        BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
        host_file = cfi->cfi_container;
 
-       if (host_file->f_op && host_file->f_op->fsync) {
-               host_dentry = host_file->f_path.dentry;
-               host_inode = host_dentry->d_inode;
-               mutex_lock(&host_inode->i_mutex);
-               err = host_file->f_op->fsync(host_file, host_dentry, datasync);
-               mutex_unlock(&host_inode->i_mutex);
-       }
-
+       err = vfs_fsync(host_file, host_file->f_path.dentry, datasync);
        if ( !err && !datasync ) {
                lock_kernel();
                err = venus_fsync(coda_inode->i_sb, coda_i2f(coda_inode));