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

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:
int (*open) (struct inode *, struct file *);
int (*flush) (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 (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *);
......
......@@ -729,7 +729,7 @@ struct file_operations {
int (*open) (struct inode *, struct file *);
int (*flush) (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 (*fasync) (int, struct file *, int);
int (*lock) (struct file *, int, struct file_lock *);
......
......@@ -1849,8 +1849,7 @@ static int spufs_mfc_flush(struct file *file, fl_owner_t id)
return ret;
}
static int spufs_mfc_fsync(struct file *file, struct dentry *dentry,
int datasync)
static int spufs_mfc_fsync(struct file *file, int datasync)
{
return spufs_mfc_flush(file, NULL);
}
......
......@@ -305,8 +305,7 @@ static int ps3flash_flush(struct file *file, fl_owner_t id)
return ps3flash_writeback(ps3flash_dev);
}
static int ps3flash_fsync(struct file *file, struct dentry *dentry,
int datasync)
static int ps3flash_fsync(struct file *file, int datasync)
{
return ps3flash_writeback(ps3flash_dev);
}
......
......@@ -189,8 +189,7 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
return new_offset;
}
static int vol_cdev_fsync(struct file *file, struct dentry *dentry,
int datasync)
static int vol_cdev_fsync(struct file *file, int datasync)
{
struct ubi_volume_desc *desc = file->private_data;
struct ubi_device *ubi = desc->vol->ubi;
......
......@@ -880,7 +880,7 @@ static struct inode *pohmelfs_alloc_inode(struct super_block *sb)
/*
* 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 writeback_control wbc = {
......
......@@ -794,7 +794,7 @@ printer_write(struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
}
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;
unsigned long flags;
......
......@@ -66,7 +66,7 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
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;
......
......@@ -257,15 +257,13 @@ v9fs_file_write(struct file *filp, const char __user * data,
return total;
}
static int v9fs_file_fsync(struct file *filp, struct dentry *dentry,
int datasync)
static int v9fs_file_fsync(struct file *filp, int datasync)
{
struct p9_fid *fid;
struct p9_wstat wstat;
int retval;
P9_DPRINTK(P9_DEBUG_VFS, "filp %p dentry %p datasync %x\n", filp,
dentry, datasync);
P9_DPRINTK(P9_DEBUG_VFS, "filp %p datasync %x\n", filp, datasync);
fid = filp->private_data;
v9fs_blank_wstat(&wstat);
......
......@@ -183,7 +183,7 @@ extern int affs_add_entry(struct inode *dir, struct inode *inode, struct dent
void affs_free_prealloc(struct inode *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 */
......
......@@ -916,9 +916,9 @@ affs_truncate(struct inode *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;
ret = write_inode_now(inode, 0);
......
......@@ -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 *,
unsigned long, loff_t);
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)
* - the return status from this call provides a reliable indication of
* 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_vnode *vnode = AFS_FS_I(dentry->d_inode);
int ret;
......
......@@ -93,8 +93,7 @@ static int bad_file_release(struct inode *inode, struct file *filp)
return -EIO;
}
static int bad_file_fsync(struct file *file, struct dentry *dentry,
int datasync)
static int bad_file_fsync(struct file *file, int datasync)
{
return -EIO;
}
......
......@@ -358,12 +358,7 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin)
return retval;
}
/*
* 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)
int blkdev_fsync(struct file *filp, int datasync)
{
struct inode *bd_inode = filp->f_mapping->host;
struct block_device *bdev = I_BDEV(bd_inode);
......
......@@ -2434,7 +2434,7 @@ void btrfs_update_iflags(struct inode *inode);
void btrfs_inherit_iflags(struct inode *inode, struct inode *dir);
/* 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 skip_pinned);
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)
* important optimization for directories because holding the mutex prevents
* 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 btrfs_root *root = BTRFS_I(inode)->root;
int ret = 0;
......
......@@ -1776,9 +1776,9 @@ static void sync_write_wait(struct inode *inode)
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);
unsigned flush_tid;
int ret;
......
......@@ -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
* operations to commit.
*/
static int ceph_dir_fsync(struct file *file, struct dentry *dentry,
int datasync)
static int ceph_dir_fsync(struct file *file, 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 list_head *head = &ci->i_unsafe_dirops;
struct ceph_mds_request *req;
......
......@@ -811,7 +811,7 @@ extern void ceph_put_cap(struct ceph_cap *cap);
extern void ceph_queue_caps_release(struct inode *inode);
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,
struct ceph_mds_session *session);
extern int ceph_get_cap_mds(struct inode *inode);
......
......@@ -84,7 +84,7 @@ extern ssize_t cifs_user_read(struct file *file, char __user *read_data,
extern ssize_t cifs_user_write(struct file *file, const char __user *write_data,
size_t write_size, loff_t *poffset);
extern int cifs_lock(struct file *, int, struct file_lock *);
extern int cifs_fsync(struct file *, struct dentry *, int);
extern int cifs_fsync(struct file *, int);
extern int cifs_flush(struct file *, fl_owner_t id);
extern int cifs_file_mmap(struct file * , struct vm_area_struct *);
extern const struct file_operations cifs_dir_ops;
......
......@@ -1676,7 +1676,7 @@ static int cifs_write_end(struct file *file, struct address_space *mapping,
return rc;
}
int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
int cifs_fsync(struct file *file, int datasync)
{
int xid;
int rc = 0;
......@@ -1688,7 +1688,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
xid = GetXid();
cFYI(1, "Sync file - name: %s datasync: 0x%x",
dentry->d_name.name, datasync);
file->f_path.dentry->d_name.name, datasync);
rc = filemap_write_and_wait(inode->i_mapping);
if (rc == 0) {
......
......@@ -11,8 +11,7 @@ extern int coda_fake_statfs;
void coda_destroy_inodecache(void);
int coda_init_inodecache(void);
int coda_fsync(struct file *coda_file, struct dentry *coda_dentry,
int datasync);
int coda_fsync(struct file *coda_file, int datasync);
void coda_sysctl_init(void);
void coda_sysctl_clean(void);
......
......@@ -202,10 +202,10 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
return 0;
}
int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
int coda_fsync(struct file *coda_file, int datasync)
{
struct file *host_file;
struct inode *coda_inode = coda_dentry->d_inode;
struct inode *coda_inode = coda_file->f_path.dentry->d_inode;
struct coda_file_info *cfi;
int err = 0;
......
......@@ -274,7 +274,7 @@ static int ecryptfs_release(struct inode *inode, struct file *file)
}
static int
ecryptfs_fsync(struct file *file, struct dentry *dentry, int datasync)
ecryptfs_fsync(struct file *file, int datasync)
{
return vfs_fsync(ecryptfs_file_to_lower(file), datasync);
}
......
......@@ -40,12 +40,11 @@ static int exofs_release_file(struct inode *inode, struct file *filp)
return 0;
}
static int exofs_file_fsync(struct file *filp, struct dentry *dentry,
int datasync)
static int exofs_file_fsync(struct file *filp, int datasync)
{
int ret;
struct address_space *mapping = filp->f_mapping;
struct inode *inode = dentry->d_inode;
struct inode *inode = mapping->host;
struct super_block *sb;
ret = filemap_write_and_wait(mapping);
......@@ -66,7 +65,7 @@ static int exofs_file_fsync(struct file *filp, struct dentry *dentry,
static int exofs_flush(struct file *file, fl_owner_t id)
{
exofs_file_fsync(file, file->f_path.dentry, 1);
exofs_file_fsync(file, 1);
/* TODO: Flush the OSD target */
return 0;
}
......
......@@ -155,7 +155,7 @@ extern void ext2_write_super (struct super_block *);
extern const struct file_operations ext2_dir_operations;
/* file.c */
extern int ext2_fsync(struct file *file, struct dentry *dentry, int datasync);
extern int ext2_fsync(struct file *file, int datasync);
extern const struct inode_operations ext2_file_inode_operations;
extern const struct file_operations ext2_file_operations;
extern const struct file_operations ext2_xip_file_operations;
......
......@@ -40,13 +40,13 @@ static int ext2_release_file (struct inode * inode, struct file * filp)
return 0;
}
int ext2_fsync(struct file *file, struct dentry *dentry, int datasync)
int ext2_fsync(struct file *file, int datasync)
{
int ret;
struct super_block *sb = dentry->d_inode->i_sb;
struct super_block *sb = file->f_mapping->host->i_sb;
struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
ret = simple_fsync(file, dentry, datasync);
ret = simple_fsync(file, datasync);
if (ret == -EIO || test_and_clear_bit(AS_EIO, &mapping->flags)) {
/* We don't really know where the IO error happened... */
ext2_error(sb, __func__,
......
......@@ -43,9 +43,9 @@
* inode to disk.
*/
int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync)
int ext3_sync_file(struct file *file, int datasync)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = file->f_mapping->host;
struct ext3_inode_info *ei = EXT3_I(inode);
journal_t *journal = EXT3_SB(inode->i_sb)->s_journal;
int ret, needs_barrier = 0;
......
......@@ -1519,7 +1519,7 @@ extern int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
extern void ext4_htree_free_dir_info(struct dir_private_info *p);
/* fsync.c */
extern int ext4_sync_file(struct file *, struct dentry *, int);
extern int ext4_sync_file(struct file *, int);
/* hash.c */
extern int ext4fs_dirhash(const char *name, int len, struct
......
......@@ -71,9 +71,9 @@ static void ext4_sync_parent(struct inode *inode)
* i_mutex lock is held when entering and exiting this function
*/
int ext4_sync_file(struct file *file, struct dentry *dentry, int datasync)
int ext4_sync_file(struct file *file, int datasync)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = file->f_mapping->host;
struct ext4_inode_info *ei = EXT4_I(inode);
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
int ret;
......@@ -81,7 +81,7 @@ int ext4_sync_file(struct file *file, struct dentry *dentry, int datasync)
J_ASSERT(ext4_journal_current_handle() == NULL);
trace_ext4_sync_file(file, dentry, datasync);
trace_ext4_sync_file(file, datasync);
if (inode->i_sb->s_flags & MS_RDONLY)
return 0;
......@@ -91,7 +91,7 @@ int ext4_sync_file(struct file *file, struct dentry *dentry, int datasync)
return ret;
if (!journal) {
ret = simple_fsync(file, dentry, datasync);
ret = simple_fsync(file, datasync);
if (!ret && !list_empty(&inode->i_dentry))
ext4_sync_parent(inode);
return ret;
......
......@@ -309,8 +309,7 @@ extern int fat_setattr(struct dentry * dentry, struct iattr * attr);
extern void fat_truncate(struct inode *inode);
extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat);
extern int fat_file_fsync(struct file *file, struct dentry *dentry,
int datasync);
extern int fat_file_fsync(struct file *file, int datasync);
/* fat/inode.c */
extern void fat_attach(struct inode *inode, loff_t i_pos);
......
......@@ -149,12 +149,12 @@ static int fat_file_release(struct inode *inode, struct file *filp)
return 0;
}
int fat_file_fsync(struct file *filp, struct dentry *dentry, int datasync)
int fat_file_fsync(struct file *filp, int datasync)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = filp->f_mapping->host;
int res, err;
res = simple_fsync(filp, dentry, datasync);
res = simple_fsync(filp, datasync);
err = sync_mapping_buffers(MSDOS_SB(inode->i_sb)->fat_inode->i_mapping);
return res ? res : err;
......
......@@ -1156,10 +1156,9 @@ static int fuse_dir_release(struct inode *inode, struct file *file)
return 0;
}
static int fuse_dir_fsync(struct file *file, struct dentry *de, int datasync)
static int fuse_dir_fsync(struct file *file, int datasync)
{
/* nfsd can call this with no file */
return file ? fuse_fsync_common(file, de, datasync, 1) : 0;
return fuse_fsync_common(file, datasync, 1);
}
static bool update_mtime(unsigned ivalid)
......
......@@ -351,10 +351,9 @@ static void fuse_sync_writes(struct inode *inode)
fuse_release_nowrite(inode);
}
int fuse_fsync_common(struct file *file, struct dentry *de, int datasync,
int isdir)
int fuse_fsync_common(struct file *file, int datasync, int isdir)
{
struct inode *inode = de->d_inode;
struct inode *inode = file->f_mapping->host;
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_file *ff = file->private_data;
struct fuse_req *req;
......@@ -403,9 +402,9 @@ int fuse_fsync_common(struct file *file, struct dentry *de, int datasync,
return err;
}
static int fuse_fsync(struct file *file, struct dentry *de, int datasync)
static int fuse_fsync(struct file *file, int datasync)
{
return fuse_fsync_common(file, de, datasync, 0);
return fuse_fsync_common(file, datasync, 0);
}
void fuse_read_fill(struct fuse_req *req, struct file *file, loff_t pos,
......
......@@ -568,8 +568,7 @@ void fuse_release_common(struct file *file, int opcode);
/**
* Send FSYNC or FSYNCDIR request
*/
int fuse_fsync_common(struct file *file, struct dentry *de, int datasync,
int isdir);
int fuse_fsync_common(struct file *file, int datasync, int isdir);
/**
* Notify poll wakeup
......
......@@ -554,9 +554,9 @@ static int gfs2_close(struct inode *inode, struct file *file)
* Returns: errno
*/
static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync)
static int gfs2_fsync(struct file *file, int datasync)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = file->f_mapping->host;
int sync_state = inode->i_state & (I_DIRTY_SYNC|I_DIRTY_DATASYNC);
int ret = 0;
......
......@@ -411,9 +411,9 @@ int hostfs_file_open(struct inode *ino, struct file *file)
return 0;
}
int hostfs_fsync(struct file *file, struct dentry *dentry, int datasync)
int hostfs_fsync(struct file *file, int datasync)
{
return fsync_file(HOSTFS_I(dentry->d_inode)->fd, datasync);
return fsync_file(HOSTFS_I(file->f_mapping->host)->fd, datasync);
}
static const struct file_operations hostfs_file_fops = {
......
......@@ -19,9 +19,9 @@ static int hpfs_file_release(struct inode *inode, struct file *file)
return 0;
}
int hpfs_file_fsync(struct file *file, struct dentry *dentry, int datasync)
int hpfs_file_fsync(struct file *file, int datasync)
{
/*return file_fsync(file, dentry);*/
/*return file_fsync(file, datasync);*/
return 0; /* Don't fsync :-) */
}
......
......@@ -268,7 +268,7 @@ void hpfs_set_ea(struct inode *, struct fnode *, const char *,
/* file.c */
int hpfs_file_fsync(struct file *, struct dentry *, int);
int hpfs_file_fsync(struct file *, int);
extern const struct file_operations hpfs_file_ops;
extern const struct inode_operations hpfs_file_iops;
extern const struct address_space_operations hpfs_aops;
......
......@@ -587,7 +587,7 @@ static int hppfs_readdir(struct file *file, void *ent, filldir_t filldir)
return err;
}
static int hppfs_fsync(struct file *file, struct dentry *dentry, int datasync)
static int hppfs_fsync(struct file *file, int datasync)
{
return 0;
}
......
......@@ -26,9 +26,9 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
struct page **pagep, void **fsdata);
static int jffs2_readpage (struct file *filp, struct page *pg);
int jffs2_fsync(struct file *filp, struct dentry *dentry, int datasync)
int jffs2_fsync(struct file *filp, int datasync)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = filp->f_mapping->host;
struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
/* Trigger GC to flush any pending writes for this inode */
......
......@@ -158,7 +158,7 @@ extern const struct inode_operations jffs2_dir_inode_operations;
extern const struct file_operations jffs2_file_operations;
extern const struct inode_operations jffs2_file_inode_operations;
extern const struct address_space_operations jffs2_file_address_operations;
int jffs2_fsync(struct file *, struct dentry *, int);
int jffs2_fsync(struct file *, int);
int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
/* ioctl.c */
......
......@@ -27,9 +27,9 @@
#include "jfs_acl.h"
#include "jfs_debug.h"
int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
int jfs_fsync(struct file *file, int datasync)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = file->f_mapping->host;
int rc = 0;
if (!(inode->i_state & I_DIRTY) ||
......
......@@ -21,7 +21,7 @@
struct fid;
extern struct inode *ialloc(struct inode *, umode_t);
extern int jfs_fsync(struct file *, struct dentry *, int);
extern int jfs_fsync(struct file *, int);
extern long jfs_ioctl(struct file *, unsigned int, unsigned long);
extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long);
extern struct inode *jfs_iget(struct super_block *, unsigned long);
......
......@@ -58,7 +58,7 @@ struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, struct na
return NULL;
}
int simple_sync_file(struct file * file, struct dentry *dentry, int datasync)
int simple_sync_file(struct file *file, int datasync)
{
return 0;
}
......@@ -851,13 +851,13 @@ struct dentry *generic_fh_to_parent(struct super_block *sb, struct fid *fid,
}
EXPORT_SYMBOL_GPL(generic_fh_to_parent);
int simple_fsync(struct file *file, struct dentry *dentry, int datasync)
int simple_fsync(struct file *file, int datasync)
{
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
.nr_to_write = 0, /* metadata-only; caller takes care of data */
};
struct inode *inode = dentry->d_inode;
struct inode *inode = file->f_mapping->host;
int err;
int ret;
......
......@@ -219,9 +219,9 @@ int logfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
}
int logfs_fsync(struct file *file, struct dentry *dentry, int datasync)
int logfs_fsync(struct file *file, int datasync)
{
struct super_block *sb = dentry->d_inode->i_sb;
struct super_block *sb = file->f_mapping->host->i_sb;
logfs_write_anchor(sb);
return 0;
......
......@@ -506,7 +506,7 @@ extern const struct address_space_operations logfs_reg_aops;
int logfs_readpage(struct file *file, struct page *page);
int logfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg);
int logfs_fsync(struct file *file, struct dentry *dentry, int datasync);
int logfs_fsync(struct file *file, int datasync);
/* gc.c */
u32 get_best_cand(struct super_block *sb, struct candidate_list *list, u32 *ec);
......
......@@ -22,7 +22,7 @@
#include <linux/ncp_fs.h>
#include "ncplib_kernel.h"
static int ncp_fsync(struct file *file, struct dentry *dentry, int datasync)
static int ncp_fsync(struct file *file, int datasync)
{
return 0;
}
......
......@@ -53,7 +53,7 @@ static int nfs_link(struct dentry *, struct inode *, struct dentry *);
static int nfs_mknod(struct inode *, struct dentry *, int, dev_t);
static int nfs_rename(struct inode *, struct dentry *,
struct inode *, struct dentry *);
static int nfs_fsync_dir(struct file *, struct dentry *, int);
static int nfs_fsync_dir(struct file *, int);
static loff_t nfs_llseek_dir(struct file *, loff_t, int);
const struct file_operations nfs_dir_operations = {
......@@ -641,8 +641,10 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin)
* All directory operations under NFS are synchronous, so fsync()
* is a dummy operation.
*/
static int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync)
static int nfs_fsync_dir(struct file *filp, int datasync)
{
struct dentry *dentry = filp->f_path.dentry;
dfprintk(FILE, "NFS: fsync dir(%s/%s) datasync %d\n",
dentry->d_parent->d_name.name, dentry->d_name.name,
datasync);
......
......@@ -53,7 +53,7 @@ static ssize_t nfs_file_splice_write(struct pipe_inode_info *pipe,
static ssize_t nfs_file_write(struct kiocb *, const struct iovec *iov,
unsigned long nr_segs, loff_t pos);
static int nfs_file_flush(struct file *, fl_owner_t id);
static int nfs_file_fsync(struct file *, struct dentry *dentry, int datasync);
static int nfs_file_fsync(struct file *, int datasync);
static int nfs_check_flags(int flags);
static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl);
static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl);
......@@ -322,8 +322,9 @@ nfs_file_mmap(struct file * file, struct vm_area_struct * vma)
* whether any write errors occurred for this process.
*/
static int
nfs_file_fsync(struct file *file, struct dentry *dentry, int datasync)
nfs_file_fsync(struct file *file, int datasync)
{
struct dentry *dentry = file->f_path.dentry;
struct nfs_open_context *ctx = nfs_file_open_context(file);
struct inode *inode = dentry->d_inode;
......
......@@ -27,7 +27,7 @@
#include "nilfs.h"
#include "segment.h"
int nilfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
int nilfs_sync_file(struct file *file, int datasync)
{
/*
* Called from fsync() system call
......@@ -37,7 +37,7 @@ int nilfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
* This function should be implemented when the writeback function
* will be implemented.
*/
struct inode *inode = dentry->d_inode;
struct inode *inode = file->f_mapping->host;
int err;
if (!nilfs_inode_dirty(inode))
......
......@@ -228,7 +228,7 @@ extern void nilfs_set_link(struct inode *, struct nilfs_dir_entry *,
struct page *, struct inode *);