aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 1a314c89f93c..52ed77eb9713 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -273,16 +273,13 @@ static int shm_release(struct inode *ino, struct file *file)
273 return 0; 273 return 0;
274} 274}
275 275
276static int shm_fsync(struct file *file, struct dentry *dentry, int datasync) 276static int shm_fsync(struct file *file, int datasync)
277{ 277{
278 int (*fsync) (struct file *, struct dentry *, int datasync);
279 struct shm_file_data *sfd = shm_file_data(file); 278 struct shm_file_data *sfd = shm_file_data(file);
280 int ret = -EINVAL;
281 279
282 fsync = sfd->file->f_op->fsync; 280 if (!sfd->file->f_op->fsync)
283 if (fsync) 281 return -EINVAL;
284 ret = fsync(sfd->file, sfd->file->f_path.dentry, datasync); 282 return sfd->file->f_op->fsync(sfd->file, datasync);
285 return ret;
286} 283}
287 284
288static unsigned long shm_get_unmapped_area(struct file *file, 285static unsigned long shm_get_unmapped_area(struct file *file,