diff options
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/file.h> | 6 | #include <linux/file.h> |
7 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/sched.h> | ||
9 | #include <linux/writeback.h> | 10 | #include <linux/writeback.h> |
10 | #include <linux/syscalls.h> | 11 | #include <linux/syscalls.h> |
11 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
@@ -93,7 +94,7 @@ long do_fsync(struct file *file, int datasync) | |||
93 | * livelocks in fsync_buffers_list(). | 94 | * livelocks in fsync_buffers_list(). |
94 | */ | 95 | */ |
95 | mutex_lock(&mapping->host->i_mutex); | 96 | mutex_lock(&mapping->host->i_mutex); |
96 | err = file->f_op->fsync(file, file->f_dentry, datasync); | 97 | err = file->f_op->fsync(file, file->f_path.dentry, datasync); |
97 | if (!ret) | 98 | if (!ret) |
98 | ret = err; | 99 | ret = err; |
99 | mutex_unlock(&mapping->host->i_mutex); | 100 | mutex_unlock(&mapping->host->i_mutex); |
@@ -222,7 +223,7 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | |||
222 | if (!file) | 223 | if (!file) |
223 | goto out; | 224 | goto out; |
224 | 225 | ||
225 | i_mode = file->f_dentry->d_inode->i_mode; | 226 | i_mode = file->f_path.dentry->d_inode->i_mode; |
226 | ret = -ESPIPE; | 227 | ret = -ESPIPE; |
227 | if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) && | 228 | if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) && |
228 | !S_ISLNK(i_mode)) | 229 | !S_ISLNK(i_mode)) |