X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=ipc%2Fshm.c;h=52ed77eb9713a932804cc8bb2b430ce4cdff4750;hb=97e0214044d9f279a3d6286c9f859696ef0b7ebe;hp=1a314c89f93cfbffa46d14e00641708147b1a918;hpb=d6f3875252bb703a9a3de0b92f7ae154f12c986c;p=~andy%2Flinux diff --git a/ipc/shm.c b/ipc/shm.c index 1a314c89f93..52ed77eb971 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -273,16 +273,13 @@ static int shm_release(struct inode *ino, struct file *file) return 0; } -static int shm_fsync(struct file *file, struct dentry *dentry, int datasync) +static int shm_fsync(struct file *file, int datasync) { - int (*fsync) (struct file *, struct dentry *, int datasync); struct shm_file_data *sfd = shm_file_data(file); - int ret = -EINVAL; - fsync = sfd->file->f_op->fsync; - if (fsync) - ret = fsync(sfd->file, sfd->file->f_path.dentry, datasync); - return ret; + if (!sfd->file->f_op->fsync) + return -EINVAL; + return sfd->file->f_op->fsync(sfd->file, datasync); } static unsigned long shm_get_unmapped_area(struct file *file,