Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / fs / ecryptfs / file.c
index 7d1050e..cedc913 100644 (file)
@@ -273,7 +273,14 @@ static int ecryptfs_release(struct inode *inode, struct file *file)
 static int
 ecryptfs_fsync(struct file *file, int datasync)
 {
-       return vfs_fsync(ecryptfs_file_to_lower(file), datasync);
+       int rc = 0;
+
+       rc = generic_file_fsync(file, datasync);
+       if (rc)
+               goto out;
+       rc = vfs_fsync(ecryptfs_file_to_lower(file), datasync);
+out:
+       return rc;
 }
 
 static int ecryptfs_fasync(int fd, struct file *file, int flag)