Commit 7ea80859 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro
Browse files

drop unused dentry argument to ->fsync


Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent cc967be5
...@@ -380,7 +380,7 @@ prototypes: ...@@ -380,7 +380,7 @@ prototypes:
int (*open) (struct inode *, struct file *); int (*open) (struct inode *, struct file *);
int (*flush) (struct file *); int (*flush) (struct file *);
int (*release) (struct inode *, struct file *); int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, struct dentry *, int datasync); int (*fsync) (struct file *, int datasync);
int (*aio_fsync) (struct kiocb *, int datasync); int (*aio_fsync) (struct kiocb *, int datasync);
int (*fasync) (int, struct file *, int); int (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *); int (*lock) (struct file *, int, struct file_lock *);
......
...@@ -729,7 +729,7 @@ struct file_operations { ...@@ -729,7 +729,7 @@ struct file_operations {
int (*open) (struct inode *, struct file *); int (*open) (struct inode *, struct file *);
int (*flush) (struct file *); int (*flush) (struct file *);
int (*release) (struct inode *, struct file *); int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, struct dentry *, int datasync); int (*fsync) (struct file *, int datasync);
int (*aio_fsync) (struct kiocb *, int datasync); int (*aio_fsync) (struct kiocb *, int datasync);
int (*fasync) (int, struct file *, int); int (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *); int (*lock) (struct file *, int, struct file_lock *);
......
...@@ -1849,8 +1849,7 @@ out: ...@@ -1849,8 +1849,7 @@ out:
return ret; return ret;
} }
static int spufs_mfc_fsync(struct file *file, struct dentry *dentry, static int spufs_mfc_fsync(struct file *file, int datasync)
int datasync)
{ {
return spufs_mfc_flush(file, NULL); return spufs_mfc_flush(file, NULL);
} }
......
...@@ -305,8 +305,7 @@ static int ps3flash_flush(struct file *file, fl_owner_t id) ...@@ -305,8 +305,7 @@ static int ps3flash_flush(struct file *file, fl_owner_t id)
return ps3flash_writeback(ps3flash_dev); return ps3flash_writeback(ps3flash_dev);
} }
static int ps3flash_fsync(struct file *file, struct dentry *dentry, static int ps3flash_fsync(struct file *file, int datasync)
int datasync)
{ {
return ps3flash_writeback(ps3flash_dev); return ps3flash_writeback(ps3flash_dev);
} }
......
...@@ -189,8 +189,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin) ...@@ -189,8 +189,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
return new_offset; return new_offset;
} }
static int vol_cdev_fsync(struct file *file, struct dentry *dentry, static int vol_cdev_fsync(struct file *file, int datasync)
int datasync)
{ {
struct ubi_volume_desc *desc = file->private_data; struct ubi_volume_desc *desc = file->private_data;
struct ubi_device *ubi = desc->vol->ubi; struct ubi_device *ubi = desc->vol->ubi;
......
...@@ -880,7 +880,7 @@ static struct inode *pohmelfs_alloc_inode(struct super_block *sb) ...@@ -880,7 +880,7 @@ static struct inode *pohmelfs_alloc_inode(struct super_block *sb)
/* /*
* We want fsync() to work on POHMELFS. * We want fsync() to work on POHMELFS.
*/ */
static int pohmelfs_fsync(struct file *file, struct dentry *dentry, int datasync) static int pohmelfs_fsync(struct file *file, int datasync)
{ {
struct inode *inode = file->f_mapping->host; struct inode *inode = file->f_mapping->host;
struct writeback_control wbc = { struct writeback_control wbc = {
......
...@@ -794,7 +794,7 @@ printer_write(struct file *fd, const char __user *buf, size_t len, loff_t *ptr) ...@@ -794,7 +794,7 @@ printer_write(struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
} }
static int static int
printer_fsync(struct file *fd, struct dentry *dentry, int datasync) printer_fsync(struct file *fd, int datasync)
{ {
struct printer_dev *dev = fd->private_data; struct printer_dev *dev = fd->private_data;
unsigned long flags; unsigned long flags;
......
...@@ -66,7 +66,7 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma, ...@@ -66,7 +66,7 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
return 0; return 0;
} }
int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, int datasync) int fb_deferred_io_fsync(struct file *file, int datasync)
{ {
struct fb_info *info = file->private_data; struct fb_info *info = file->private_data;
......
...@@ -257,15 +257,13 @@ v9fs_file_write(struct file *filp, const char __user * data, ...@@ -257,15 +257,13 @@ v9fs_file_write(struct file *filp, const char __user * data,
return total; return total;
} }
static int v9fs_file_fsync(struct file *filp, struct dentry *dentry, static int v9fs_file_fsync(struct file *filp, int datasync)
int datasync)
{ {
struct p9_fid *fid; struct p9_fid *fid;
struct p9_wstat wstat; struct p9_wstat wstat;
int retval; int retval;
P9_DPRINTK(P9_DEBUG_VFS, "filp %p dentry %p datasync %x\n", filp, P9_DPRINTK(P9_DEBUG_VFS, "filp %p datasync %x\n", filp, datasync);
dentry, datasync);
fid = filp->private_data; fid = filp->private_data;
v9fs_blank_wstat(&wstat); v9fs_blank_wstat(&wstat);
......
...@@ -183,7 +183,7 @@ extern int affs_add_entry(struct inode *dir, struct inode *inode, struct dent ...@@ -183,7 +183,7 @@ extern int affs_add_entry(struct inode *dir, struct inode *inode, struct dent
void affs_free_prealloc(struct inode *inode); void affs_free_prealloc(struct inode *inode);
extern void affs_truncate(struct inode *); extern void affs_truncate(struct inode *);
int affs_file_fsync(struct file *, struct dentry *, int); int affs_file_fsync(struct file *, int);
/* dir.c */ /* dir.c */
......
...@@ -916,9 +916,9 @@ affs_truncate(struct inode *inode) ...@@ -916,9 +916,9 @@ affs_truncate(struct inode *inode)
affs_free_prealloc(inode); affs_free_prealloc(inode);
} }
int affs_file_fsync(struct file *filp, struct dentry *dentry, int datasync) int affs_file_fsync(struct file *filp, int datasync)
{ {
struct inode * inode = dentry->d_inode; struct inode *inode = filp->f_mapping->host;
int ret, err; int ret, err;
ret = write_inode_now(inode, 0); ret = write_inode_now(inode, 0);
......
...@@ -740,7 +740,7 @@ extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *); ...@@ -740,7 +740,7 @@ extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *);
extern ssize_t afs_file_write(struct kiocb *, const struct iovec *, extern ssize_t afs_file_write(struct kiocb *, const struct iovec *,
unsigned long, loff_t); unsigned long, loff_t);
extern int afs_writeback_all(struct afs_vnode *); extern int afs_writeback_all(struct afs_vnode *);
extern int afs_fsync(struct file *, struct dentry *, int); extern int afs_fsync(struct file *, int);
/*****************************************************************************/ /*****************************************************************************/
......
...@@ -701,8 +701,9 @@ int afs_writeback_all(struct afs_vnode *vnode) ...@@ -701,8 +701,9 @@ int afs_writeback_all(struct afs_vnode *vnode)
* - the return status from this call provides a reliable indication of * - the return status from this call provides a reliable indication of
* whether any write errors occurred for this process. * whether any write errors occurred for this process.
*/ */
int afs_fsync(struct file *file, struct dentry *dentry, int datasync) int afs_fsync(struct file *file, int datasync)
{ {
struct dentry *dentry = file->f_path.dentry;
struct afs_writeback *wb, *xwb; struct afs_writeback *wb, *xwb;
struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode); struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode);
int ret; int ret;
......
...@@ -93,8 +93,7 @@ static int bad_file_release(struct inode *inode, struct file *filp) ...@@ -93,8 +93,7 @@ static int bad_file_release(struct inode *inode, struct file *filp)
return -EIO; return -EIO;
} }
static int bad_file_fsync(struct file *file, struct dentry *dentry, static int bad_file_fsync(struct file *file, int datasync)
int datasync)
{ {
return -EIO; return -EIO;
} }
......
...@@ -358,12 +358,7 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin) ...@@ -358,12 +358,7 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin)
return retval; return retval;
} }
/* int blkdev_fsync(struct file *filp, int datasync)
* Filp is never NULL; the only case when ->fsync() is called with
* NULL first argument is nfsd_sync_dir() and that's not a directory.
*/
int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync)
{ {
struct inode *bd_inode = filp->f_mapping->host; struct inode *bd_inode = filp->f_mapping->host;
struct block_device *bdev = I_BDEV(bd_inode); struct block_device *bdev = I_BDEV(bd_inode);
......
...@@ -2434,7 +2434,7 @@ void btrfs_update_iflags(struct inode *inode); ...@@ -2434,7 +2434,7 @@ void btrfs_update_iflags(struct inode *inode);
void btrfs_inherit_iflags(struct inode *inode, struct inode *dir); void btrfs_inherit_iflags(struct inode *inode, struct inode *dir);
/* file.c */ /* file.c */
int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync); int btrfs_sync_file(struct file *file, int datasync);
int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end, int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end,
int skip_pinned); int skip_pinned);
int btrfs_check_file(struct btrfs_root *root, struct inode *inode); int btrfs_check_file(struct btrfs_root *root, struct inode *inode);
......
...@@ -1101,8 +1101,9 @@ int btrfs_release_file(struct inode *inode, struct file *filp) ...@@ -1101,8 +1101,9 @@ int btrfs_release_file(struct inode *inode, struct file *filp)
* important optimization for directories because holding the mutex prevents * important optimization for directories because holding the mutex prevents
* new operations on the dir while we write to disk. * new operations on the dir while we write to disk.
*/ */
int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) int btrfs_sync_file(struct file *file, int datasync)
{ {
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_root *root = BTRFS_I(inode)->root;
int ret = 0; int ret = 0;
......
...@@ -1776,9 +1776,9 @@ out: ...@@ -1776,9 +1776,9 @@ out:
spin_unlock(&ci->i_unsafe_lock); spin_unlock(&ci->i_unsafe_lock);
} }
int ceph_fsync(struct file *file, struct dentry *dentry, int datasync) int ceph_fsync(struct file *file, int datasync)
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = file->f_mapping->host;
struct ceph_inode_info *ci = ceph_inode(inode); struct ceph_inode_info *ci = ceph_inode(inode);
unsigned flush_tid; unsigned flush_tid;
int ret; int ret;
......
...@@ -1107,10 +1107,9 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size, ...@@ -1107,10 +1107,9 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size,
* an fsync() on a dir will wait for any uncommitted directory * an fsync() on a dir will wait for any uncommitted directory
* operations to commit. * operations to commit.
*/ */
static int ceph_dir_fsync(struct file *file, struct dentry *dentry, static int ceph_dir_fsync(struct file *file, int datasync)
int datasync)
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = file->f_path.dentry->d_inode;
struct ceph_inode_info *ci = ceph_inode(inode); struct ceph_inode_info *ci = ceph_inode(inode);
struct list_head *head = &ci->i_unsafe_dirops; struct list_head *head = &ci->i_unsafe_dirops;
struct ceph_mds_request *req; struct ceph_mds_request *req;
......
...@@ -811,7 +811,7 @@ extern void ceph_put_cap(struct ceph_cap *cap); ...@@ -811,7 +811,7 @@ extern void ceph_put_cap(struct ceph_cap *cap);
extern void ceph_queue_caps_release(struct inode *inode); extern void ceph_queue_caps_release(struct inode *inode);
extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc); extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc);
extern int ceph_fsync(struct file *file, struct dentry *dentry, int datasync); extern int ceph_fsync(struct file *file, int datasync);
extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc,
struct ceph_mds_session *session); struct ceph_mds_session *session);
extern int ceph_get_cap_mds(struct inode *inode); extern int ceph_get_cap_mds(struct inode *inode);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment