Signed-off-by: Christoph Hellwig <hch@xxxxxx> Index: linux-2.6/arch/powerpc/platforms/cell/spufs/file.c =================================================================== --- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/file.c 2010-05-25 19:28:04.965004819 +0200 +++ linux-2.6/arch/powerpc/platforms/cell/spufs/file.c 2010-05-25 19:55:33.804006007 +0200 @@ -1849,8 +1849,7 @@ out: 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); } Index: linux-2.6/drivers/char/ps3flash.c =================================================================== --- linux-2.6.orig/drivers/char/ps3flash.c 2010-05-25 19:28:05.000005307 +0200 +++ linux-2.6/drivers/char/ps3flash.c 2010-05-25 19:28:42.724005248 +0200 @@ -305,8 +305,7 @@ static int ps3flash_flush(struct file *f 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); } Index: linux-2.6/drivers/mtd/ubi/cdev.c =================================================================== --- linux-2.6.orig/drivers/mtd/ubi/cdev.c 2010-05-25 19:28:05.033004819 +0200 +++ linux-2.6/drivers/mtd/ubi/cdev.c 2010-05-25 19:29:02.952004540 +0200 @@ -189,8 +189,7 @@ static loff_t vol_cdev_llseek(struct fil 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; Index: linux-2.6/drivers/staging/pohmelfs/inode.c =================================================================== --- linux-2.6.orig/drivers/staging/pohmelfs/inode.c 2010-05-25 19:28:05.055004819 +0200 +++ linux-2.6/drivers/staging/pohmelfs/inode.c 2010-05-25 19:29:19.502004119 +0200 @@ -880,7 +880,7 @@ static struct inode *pohmelfs_alloc_inod /* * 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 = { Index: linux-2.6/drivers/usb/gadget/printer.c =================================================================== --- linux-2.6.orig/drivers/usb/gadget/printer.c 2010-05-25 19:28:05.075003980 +0200 +++ linux-2.6/drivers/usb/gadget/printer.c 2010-05-25 19:29:32.024254435 +0200 @@ -794,7 +794,7 @@ printer_write(struct file *fd, const cha } 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; Index: linux-2.6/fs/9p/vfs_file.c =================================================================== --- linux-2.6.orig/fs/9p/vfs_file.c 2010-05-25 19:28:05.124003492 +0200 +++ linux-2.6/fs/9p/vfs_file.c 2010-05-25 19:30:09.779281883 +0200 @@ -257,15 +257,13 @@ v9fs_file_write(struct file *filp, const 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); Index: linux-2.6/fs/bad_inode.c =================================================================== --- linux-2.6.orig/fs/bad_inode.c 2010-05-25 19:28:05.224004050 +0200 +++ linux-2.6/fs/bad_inode.c 2010-05-25 19:31:04.010233971 +0200 @@ -93,8 +93,7 @@ static int bad_file_release(struct inode 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; } Index: linux-2.6/fs/block_dev.c =================================================================== --- linux-2.6.orig/fs/block_dev.c 2010-05-25 19:28:05.250004050 +0200 +++ linux-2.6/fs/block_dev.c 2010-05-25 19:31:34.647003421 +0200 @@ -358,12 +358,7 @@ static loff_t block_llseek(struct file * 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); Index: linux-2.6/fs/btrfs/file.c =================================================================== --- linux-2.6.orig/fs/btrfs/file.c 2010-05-25 19:28:05.262004120 +0200 +++ linux-2.6/fs/btrfs/file.c 2010-05-25 20:00:48.323254015 +0200 @@ -1063,8 +1063,9 @@ int btrfs_release_file(struct inode *ino * 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; Index: linux-2.6/fs/ceph/dir.c =================================================================== --- linux-2.6.orig/fs/ceph/dir.c 2010-05-25 19:28:05.288005098 +0200 +++ linux-2.6/fs/ceph/dir.c 2010-05-25 19:34:26.476004259 +0200 @@ -1107,10 +1107,9 @@ static ssize_t ceph_read_dir(struct file * 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; Index: linux-2.6/fs/coda/file.c =================================================================== --- linux-2.6.orig/fs/coda/file.c 2010-05-25 19:28:05.340004609 +0200 +++ linux-2.6/fs/coda/file.c 2010-05-25 20:38:15.059255629 +0200 @@ -202,10 +202,10 @@ int coda_release(struct inode *coda_inod 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; Index: linux-2.6/fs/ecryptfs/file.c =================================================================== --- linux-2.6.orig/fs/ecryptfs/file.c 2010-05-25 19:28:05.352004399 +0200 +++ linux-2.6/fs/ecryptfs/file.c 2010-05-25 19:35:28.923254714 +0200 @@ -274,7 +274,7 @@ static int ecryptfs_release(struct inode } 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); } Index: linux-2.6/fs/exofs/file.c =================================================================== --- linux-2.6.orig/fs/exofs/file.c 2010-05-25 19:28:05.364003911 +0200 +++ linux-2.6/fs/exofs/file.c 2010-05-25 20:39:35.453251013 +0200 @@ -40,12 +40,11 @@ static int exofs_release_file(struct ino 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 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; } Index: linux-2.6/fs/ext2/file.c =================================================================== --- linux-2.6.orig/fs/ext2/file.c 2010-05-25 19:28:05.390004469 +0200 +++ linux-2.6/fs/ext2/file.c 2010-05-25 19:37:15.754254015 +0200 @@ -40,13 +40,13 @@ static int ext2_release_file (struct ino 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__, Index: linux-2.6/fs/fat/file.c =================================================================== --- linux-2.6.orig/fs/fat/file.c 2010-05-25 19:28:05.470004469 +0200 +++ linux-2.6/fs/fat/file.c 2010-05-25 19:38:16.400003561 +0200 @@ -149,12 +149,12 @@ static int fat_file_release(struct inode 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; Index: linux-2.6/fs/fuse/dir.c =================================================================== --- linux-2.6.orig/fs/fuse/dir.c 2010-05-25 19:28:05.482003771 +0200 +++ linux-2.6/fs/fuse/dir.c 2010-05-25 20:04:04.022262466 +0200 @@ -1156,10 +1156,9 @@ static int fuse_dir_release(struct inode 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) Index: linux-2.6/fs/fuse/file.c =================================================================== --- linux-2.6.orig/fs/fuse/file.c 2010-05-25 19:28:05.496004469 +0200 +++ linux-2.6/fs/fuse/file.c 2010-05-25 20:04:19.089255063 +0200 @@ -351,10 +351,9 @@ static void fuse_sync_writes(struct inod 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, 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, Index: linux-2.6/fs/gfs2/file.c =================================================================== --- linux-2.6.orig/fs/gfs2/file.c 2010-05-25 19:28:05.508004120 +0200 +++ linux-2.6/fs/gfs2/file.c 2010-05-25 19:39:36.117004749 +0200 @@ -554,9 +554,9 @@ static int gfs2_close(struct inode *inod * 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; Index: linux-2.6/fs/hostfs/hostfs_kern.c =================================================================== --- linux-2.6.orig/fs/hostfs/hostfs_kern.c 2010-05-25 19:28:05.546003911 +0200 +++ linux-2.6/fs/hostfs/hostfs_kern.c 2010-05-25 19:41:48.781012711 +0200 @@ -411,9 +411,9 @@ int hostfs_file_open(struct inode *ino, 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 = { Index: linux-2.6/fs/hpfs/file.c =================================================================== --- linux-2.6.orig/fs/hpfs/file.c 2010-05-25 19:28:05.572003631 +0200 +++ linux-2.6/fs/hpfs/file.c 2010-05-25 19:42:20.809005517 +0200 @@ -19,9 +19,9 @@ static int hpfs_file_release(struct inod 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 :-) */ } Index: linux-2.6/fs/hppfs/hppfs.c =================================================================== --- linux-2.6.orig/fs/hppfs/hppfs.c 2010-05-25 19:28:05.587003980 +0200 +++ linux-2.6/fs/hppfs/hppfs.c 2010-05-25 19:42:33.840003282 +0200 @@ -587,7 +587,7 @@ static int hppfs_readdir(struct file *fi 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; } Index: linux-2.6/fs/jffs2/file.c =================================================================== --- linux-2.6.orig/fs/jffs2/file.c 2010-05-25 19:28:05.625004749 +0200 +++ linux-2.6/fs/jffs2/file.c 2010-05-25 20:40:48.341285304 +0200 @@ -26,9 +26,9 @@ static int jffs2_write_begin(struct file 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 */ Index: linux-2.6/fs/jfs/file.c =================================================================== --- linux-2.6.orig/fs/jfs/file.c 2010-05-25 19:28:05.636005098 +0200 +++ linux-2.6/fs/jfs/file.c 2010-05-25 19:43:29.600007542 +0200 @@ -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) || Index: linux-2.6/fs/libfs.c =================================================================== --- linux-2.6.orig/fs/libfs.c 2010-05-25 19:28:05.662004260 +0200 +++ linux-2.6/fs/libfs.c 2010-05-25 19:44:36.195254853 +0200 @@ -58,7 +58,7 @@ struct dentry *simple_lookup(struct inod 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(stru } 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; Index: linux-2.6/fs/logfs/file.c =================================================================== --- linux-2.6.orig/fs/logfs/file.c 2010-05-25 19:28:05.689004260 +0200 +++ linux-2.6/fs/logfs/file.c 2010-05-25 19:44:58.901008172 +0200 @@ -219,9 +219,9 @@ int logfs_ioctl(struct inode *inode, str } } -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; Index: linux-2.6/fs/ncpfs/file.c =================================================================== --- linux-2.6.orig/fs/ncpfs/file.c 2010-05-25 19:28:05.744003841 +0200 +++ linux-2.6/fs/ncpfs/file.c 2010-05-25 19:45:37.885255063 +0200 @@ -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; } Index: linux-2.6/fs/nfs/dir.c =================================================================== --- linux-2.6.orig/fs/nfs/dir.c 2010-05-25 19:28:05.756004539 +0200 +++ linux-2.6/fs/nfs/dir.c 2010-05-25 19:47:49.662005727 +0200 @@ -53,7 +53,7 @@ static int nfs_link(struct dentry *, str 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 @@ out: * 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); Index: linux-2.6/fs/nfs/file.c =================================================================== --- linux-2.6.orig/fs/nfs/file.c 2010-05-25 19:28:05.778004609 +0200 +++ linux-2.6/fs/nfs/file.c 2010-05-25 19:48:40.314274899 +0200 @@ -53,7 +53,7 @@ static ssize_t nfs_file_splice_write(str 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 * 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; Index: linux-2.6/fs/nilfs2/file.c =================================================================== --- linux-2.6.orig/fs/nilfs2/file.c 2010-05-25 19:28:05.813004679 +0200 +++ linux-2.6/fs/nilfs2/file.c 2010-05-25 19:49:18.221257437 +0200 @@ -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, s * 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)) Index: linux-2.6/fs/ntfs/dir.c =================================================================== --- linux-2.6.orig/fs/ntfs/dir.c 2010-05-25 19:28:05.835004120 +0200 +++ linux-2.6/fs/ntfs/dir.c 2010-05-25 19:49:41.054254086 +0200 @@ -1527,10 +1527,9 @@ static int ntfs_dir_open(struct inode *v * this problem for now. We do write the $BITMAP attribute if it is present * which is the important one for a directory so things are not too bad. */ -static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry, - int datasync) +static int ntfs_dir_fsync(struct file *filp, int datasync) { - struct inode *bmp_vi, *vi = dentry->d_inode; + struct inode *bmp_vi, *vi = filp->f_mapping->host; int err, ret; ntfs_attr na; Index: linux-2.6/fs/ntfs/file.c =================================================================== --- linux-2.6.orig/fs/ntfs/file.c 2010-05-25 19:28:05.854003911 +0200 +++ linux-2.6/fs/ntfs/file.c 2010-05-25 19:50:16.901003981 +0200 @@ -2133,7 +2133,6 @@ static ssize_t ntfs_file_aio_write(struc /** * ntfs_file_fsync - sync a file to disk * @filp: file to be synced - * @dentry: dentry describing the file to sync * @datasync: if non-zero only flush user data and not metadata * * Data integrity sync of a file to disk. Used for fsync, fdatasync, and msync @@ -2149,19 +2148,15 @@ static ssize_t ntfs_file_aio_write(struc * Also, if @datasync is true, we do not wait on the inode to be written out * but we always wait on the page cache pages to be written out. * - * Note: In the past @filp could be NULL so we ignore it as we don't need it - * anyway. - * * Locking: Caller must hold i_mutex on the inode. * * TODO: We should probably also write all attribute/index inodes associated * with this inode but since we have no simple way of getting to them we ignore * this problem for now. */ -static int ntfs_file_fsync(struct file *filp, struct dentry *dentry, - int datasync) +static int ntfs_file_fsync(struct file *filp, int datasync) { - struct inode *vi = dentry->d_inode; + struct inode *vi = filp->f_dentry->host; int err, ret = 0; ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); Index: linux-2.6/fs/ocfs2/file.c =================================================================== --- linux-2.6.orig/fs/ocfs2/file.c 2010-05-25 19:28:05.866004679 +0200 +++ linux-2.6/fs/ocfs2/file.c 2010-05-25 19:51:10.776004470 +0200 @@ -175,12 +175,11 @@ static int ocfs2_dir_release(struct inod return 0; } -static int ocfs2_sync_file(struct file *file, - struct dentry *dentry, - int datasync) +static int ocfs2_sync_file(struct file *file, int datasync) { int err = 0; journal_t *journal; + struct dentry *dentry = file->f_mapping->host; struct inode *inode = dentry->d_inode; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); Index: linux-2.6/fs/reiserfs/dir.c =================================================================== --- linux-2.6.orig/fs/reiserfs/dir.c 2010-05-25 19:28:05.930004050 +0200 +++ linux-2.6/fs/reiserfs/dir.c 2010-05-25 19:51:53.820257578 +0200 @@ -14,8 +14,7 @@ extern const struct reiserfs_key MIN_KEY; static int reiserfs_readdir(struct file *, void *, filldir_t); -static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, - int datasync); +static int reiserfs_dir_fsync(struct file *filp, int datasync); const struct file_operations reiserfs_dir_operations = { .read = generic_read_dir, @@ -27,10 +26,9 @@ const struct file_operations reiserfs_di #endif }; -static int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, - int datasync) +static int reiserfs_dir_fsync(struct file *filp, int datasync) { - struct inode *inode = dentry->d_inode; + struct inode *inode = filp->f_mapping->host; int err; reiserfs_write_lock(inode->i_sb); err = reiserfs_commit_for_inode(inode); Index: linux-2.6/fs/reiserfs/file.c =================================================================== --- linux-2.6.orig/fs/reiserfs/file.c 2010-05-25 19:28:05.946004679 +0200 +++ linux-2.6/fs/reiserfs/file.c 2010-05-25 19:52:42.318255761 +0200 @@ -134,10 +134,9 @@ static void reiserfs_vfs_truncate_file(s * be removed... */ -static int reiserfs_sync_file(struct file *filp, - struct dentry *dentry, int datasync) +static int reiserfs_sync_file(struct file *filp, int datasync) { - struct inode *inode = dentry->d_inode; + struct inode *inode = filp->f_mapping->host; int err; int barrier_done; Index: linux-2.6/fs/smbfs/file.c =================================================================== --- linux-2.6.orig/fs/smbfs/file.c 2010-05-25 19:28:05.958003980 +0200 +++ linux-2.6/fs/smbfs/file.c 2010-05-25 19:53:26.777016412 +0200 @@ -28,8 +28,9 @@ #include "proto.h" static int -smb_fsync(struct file *file, struct dentry * dentry, int datasync) +smb_fsync(struct file *file, int datasync) { + struct dentry *dentry = file->f_path.dentry; struct smb_sb_info *server = server_from_dentry(dentry); int result; Index: linux-2.6/fs/ubifs/file.c =================================================================== --- linux-2.6.orig/fs/ubifs/file.c 2010-05-25 19:28:06.010003980 +0200 +++ linux-2.6/fs/ubifs/file.c 2010-05-25 19:54:02.553005936 +0200 @@ -1304,9 +1304,9 @@ static void *ubifs_follow_link(struct de return NULL; } -int ubifs_fsync(struct file *file, struct dentry *dentry, int datasync) +int ubifs_fsync(struct file *file, int datasync) { - struct inode *inode = dentry->d_inode; + struct inode *inode = file->f_mapping->host; struct ubifs_info *c = inode->i_sb->s_fs_info; int err; Index: linux-2.6/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_file.c 2010-05-25 19:28:06.075004609 +0200 +++ linux-2.6/fs/xfs/linux-2.6/xfs_file.c 2010-05-25 20:44:55.018255204 +0200 @@ -100,10 +100,10 @@ xfs_iozero( STATIC int xfs_file_fsync( struct file *file, - struct dentry *dentry, int datasync) { - struct xfs_inode *ip = XFS_I(dentry->d_inode); + struct inode *inode = file->f_mapping->host; + struct xfs_inode *ip = XFS_I(inode); struct xfs_trans *tp; int error = 0; int log_flushed = 0; @@ -140,8 +140,8 @@ xfs_file_fsync( * might gets cleared when the inode gets written out via the AIL * or xfs_iflush_cluster. */ - if (((dentry->d_inode->i_state & I_DIRTY_DATASYNC) || - ((dentry->d_inode->i_state & I_DIRTY_SYNC) && !datasync)) && + if (((inode->i_state & I_DIRTY_DATASYNC) || + ((inode->i_state & I_DIRTY_SYNC) && !datasync)) && ip->i_update_core) { /* * Kick off a transaction to log the inode core to get the @@ -868,7 +868,7 @@ write_retry: mutex_lock(&inode->i_mutex); xfs_ilock(ip, iolock); - error2 = -xfs_file_fsync(file, file->f_path.dentry, + error2 = -xfs_file_fsync(file, (file->f_flags & __O_SYNC) ? 0 : 1); if (!error) error = error2; Index: linux-2.6/ipc/shm.c =================================================================== --- linux-2.6.orig/ipc/shm.c 2010-05-25 19:28:06.088003422 +0200 +++ linux-2.6/ipc/shm.c 2010-05-25 19:55:27.992041136 +0200 @@ -273,16 +273,13 @@ static int shm_release(struct inode *ino 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, Index: linux-2.6/Documentation/filesystems/Locking =================================================================== --- linux-2.6.orig/Documentation/filesystems/Locking 2010-05-25 19:56:38.830004051 +0200 +++ linux-2.6/Documentation/filesystems/Locking 2010-05-25 19:56:48.471005656 +0200 @@ -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 *); Index: linux-2.6/Documentation/filesystems/vfs.txt =================================================================== --- linux-2.6.orig/Documentation/filesystems/vfs.txt 2010-05-25 19:56:52.083256739 +0200 +++ linux-2.6/Documentation/filesystems/vfs.txt 2010-05-25 19:56:59.955075220 +0200 @@ -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 *); Index: linux-2.6/fs/ext4/fsync.c =================================================================== --- linux-2.6.orig/fs/ext4/fsync.c 2010-05-25 19:57:44.055023188 +0200 +++ linux-2.6/fs/ext4/fsync.c 2010-05-25 20:08:57.846033385 +0200 @@ -48,9 +48,9 @@ * 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; @@ -58,7 +58,7 @@ int ext4_sync_file(struct file *file, st 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; @@ -68,7 +68,7 @@ int ext4_sync_file(struct file *file, st return ret; if (!journal) - return simple_fsync(file, dentry, datasync); + return simple_fsync(file, datasync); /* * data=writeback,ordered: Index: linux-2.6/fs/sync.c =================================================================== --- linux-2.6.orig/fs/sync.c 2010-05-25 19:55:43.229004191 +0200 +++ linux-2.6/fs/sync.c 2010-05-25 20:16:32.522282929 +0200 @@ -130,12 +130,10 @@ void emergency_sync(void) /* * Generic function to fsync a file. - * - * filp may be NULL if called via the msync of a vma. */ -int file_fsync(struct file *filp, struct dentry *dentry, int datasync) +int file_fsync(struct file *filp, int datasync) { - struct inode * inode = dentry->d_inode; + struct inode *inode = filp->f_mapping->host; struct super_block * sb; int ret, err; @@ -183,7 +181,7 @@ int vfs_fsync_range(struct file *file, l * livelocks in fsync_buffers_list(). */ mutex_lock(&mapping->host->i_mutex); - err = file->f_op->fsync(file, file->f_path.dentry, datasync); + err = file->f_op->fsync(file, datasync); if (!ret) ret = err; mutex_unlock(&mapping->host->i_mutex); Index: linux-2.6/include/linux/fs.h =================================================================== --- linux-2.6.orig/include/linux/fs.h 2010-05-25 19:55:43.212004330 +0200 +++ linux-2.6/include/linux/fs.h 2010-05-25 19:56:10.316032128 +0200 @@ -1497,7 +1497,7 @@ struct file_operations { int (*open) (struct inode *, struct file *); int (*flush) (struct file *, fl_owner_t id); 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 *); @@ -2212,7 +2212,7 @@ extern int generic_segment_checks(const /* fs/block_dev.c */ extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos); -extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync); +extern int blkdev_fsync(struct file *filp, int datasync); /* fs/splice.c */ extern ssize_t generic_file_splice_read(struct file *, loff_t *, @@ -2341,7 +2341,7 @@ extern int simple_link(struct dentry *, extern int simple_unlink(struct inode *, struct dentry *); extern int simple_rmdir(struct inode *, struct dentry *); extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); -extern int simple_sync_file(struct file *, struct dentry *, int); +extern int simple_sync_file(struct file *, int); extern int simple_empty(struct dentry *); extern int simple_readpage(struct file *file, struct page *page); extern int simple_write_begin(struct file *file, struct address_space *mapping, @@ -2366,7 +2366,7 @@ extern ssize_t simple_read_from_buffer(v extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos, const void __user *from, size_t count); -extern int simple_fsync(struct file *, struct dentry *, int); +extern int simple_fsync(struct file *, int); #ifdef CONFIG_MIGRATION extern int buffer_migrate_page(struct address_space *, Index: linux-2.6/drivers/video/fb_defio.c =================================================================== --- linux-2.6.orig/drivers/video/fb_defio.c 2010-05-25 19:58:28.762253666 +0200 +++ linux-2.6/drivers/video/fb_defio.c 2010-05-25 19:58:38.678033942 +0200 @@ -66,7 +66,7 @@ static int fb_deferred_io_fault(struct v 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; Index: linux-2.6/fs/affs/affs.h =================================================================== --- linux-2.6.orig/fs/affs/affs.h 2010-05-25 19:59:06.477254295 +0200 +++ linux-2.6/fs/affs/affs.h 2010-05-25 19:59:13.947254224 +0200 @@ -183,7 +183,7 @@ extern int affs_add_entry(struct inod 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 */ Index: linux-2.6/fs/affs/file.c =================================================================== --- linux-2.6.orig/fs/affs/file.c 2010-05-25 19:28:05.197004819 +0200 +++ linux-2.6/fs/affs/file.c 2010-05-25 20:24:38.220254224 +0200 @@ -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); Index: linux-2.6/fs/afs/internal.h =================================================================== --- linux-2.6.orig/fs/afs/internal.h 2010-05-25 19:59:53.441003981 +0200 +++ linux-2.6/fs/afs/internal.h 2010-05-25 19:59:59.401253946 +0200 @@ -740,7 +740,7 @@ extern void afs_pages_written_back(struc 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); /*****************************************************************************/ Index: linux-2.6/fs/afs/write.c =================================================================== --- linux-2.6.orig/fs/afs/write.c 2010-05-25 19:59:53.462004121 +0200 +++ linux-2.6/fs/afs/write.c 2010-05-25 20:00:21.555003981 +0200 @@ -701,8 +701,9 @@ int afs_writeback_all(struct afs_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; Index: linux-2.6/fs/btrfs/ctree.h =================================================================== --- linux-2.6.orig/fs/btrfs/ctree.h 2010-05-25 20:00:35.205003980 +0200 +++ linux-2.6/fs/btrfs/ctree.h 2010-05-25 20:00:43.606004540 +0200 @@ -2361,7 +2361,7 @@ void btrfs_update_iflags(struct inode *i 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); Index: linux-2.6/fs/ceph/caps.c =================================================================== --- linux-2.6.orig/fs/ceph/caps.c 2010-05-25 20:01:03.402003980 +0200 +++ linux-2.6/fs/ceph/caps.c 2010-05-25 20:01:32.433254364 +0200 @@ -1776,9 +1776,9 @@ out: 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; Index: linux-2.6/fs/ceph/super.h =================================================================== --- linux-2.6.orig/fs/ceph/super.h 2010-05-25 20:01:41.204254784 +0200 +++ linux-2.6/fs/ceph/super.h 2010-05-25 20:01:46.915004119 +0200 @@ -811,7 +811,7 @@ extern void ceph_put_cap(struct ceph_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); Index: linux-2.6/fs/cifs/cifsfs.h =================================================================== --- linux-2.6.orig/fs/cifs/cifsfs.h 2010-05-25 20:01:57.286254155 +0200 +++ linux-2.6/fs/cifs/cifsfs.h 2010-05-25 20:02:31.566272524 +0200 @@ -84,7 +84,7 @@ extern ssize_t cifs_user_read(struct fil 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; Index: linux-2.6/fs/cifs/file.c =================================================================== --- linux-2.6.orig/fs/cifs/file.c 2010-05-25 20:01:57.304254016 +0200 +++ linux-2.6/fs/cifs/file.c 2010-05-25 20:02:28.430253875 +0200 @@ -1676,7 +1676,7 @@ static int cifs_write_end(struct file *f 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 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) { Index: linux-2.6/fs/coda/coda_int.h =================================================================== --- linux-2.6.orig/fs/coda/coda_int.h 2010-05-25 20:02:43.900262048 +0200 +++ linux-2.6/fs/coda/coda_int.h 2010-05-25 20:02:50.266254365 +0200 @@ -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); Index: linux-2.6/fs/ext2/ext2.h =================================================================== --- linux-2.6.orig/fs/ext2/ext2.h 2010-05-25 20:03:12.621254294 +0200 +++ linux-2.6/fs/ext2/ext2.h 2010-05-25 20:03:18.628005099 +0200 @@ -155,7 +155,7 @@ extern void ext2_write_super (struct sup 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; Index: linux-2.6/fs/ext3/fsync.c =================================================================== --- linux-2.6.orig/fs/ext3/fsync.c 2010-05-25 20:07:37.718253736 +0200 +++ linux-2.6/fs/ext3/fsync.c 2010-05-25 20:08:04.649272384 +0200 @@ -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; Index: linux-2.6/fs/ext4/ext4.h =================================================================== --- linux-2.6.orig/fs/ext4/ext4.h 2010-05-25 20:08:27.687254714 +0200 +++ linux-2.6/fs/ext4/ext4.h 2010-05-25 20:08:36.871007195 +0200 @@ -1398,7 +1398,7 @@ extern int ext4_htree_store_dirent(struc 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 Index: linux-2.6/fs/fat/fat.h =================================================================== --- linux-2.6.orig/fs/fat/fat.h 2010-05-25 20:07:10.714254294 +0200 +++ linux-2.6/fs/fat/fat.h 2010-05-25 20:07:16.411004609 +0200 @@ -309,8 +309,7 @@ extern int fat_setattr(struct dentry * d 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); Index: linux-2.6/fs/fuse/fuse_i.h =================================================================== --- linux-2.6.orig/fs/fuse/fuse_i.h 2010-05-25 20:03:38.942004818 +0200 +++ linux-2.6/fs/fuse/fuse_i.h 2010-05-25 20:04:14.484253736 +0200 @@ -568,8 +568,7 @@ void fuse_release_common(struct file *fi /** * 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 Index: linux-2.6/fs/hpfs/hpfs_fn.h =================================================================== --- linux-2.6.orig/fs/hpfs/hpfs_fn.h 2010-05-25 20:05:24.929254923 +0200 +++ linux-2.6/fs/hpfs/hpfs_fn.h 2010-05-25 20:05:32.902005448 +0200 @@ -268,7 +268,7 @@ void hpfs_set_ea(struct inode *, struct /* 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; Index: linux-2.6/fs/jffs2/os-linux.h =================================================================== --- linux-2.6.orig/fs/jffs2/os-linux.h 2010-05-25 20:06:53.965004120 +0200 +++ linux-2.6/fs/jffs2/os-linux.h 2010-05-25 20:06:59.190003630 +0200 @@ -158,7 +158,7 @@ extern const struct inode_operations jff 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 */ Index: linux-2.6/fs/jfs/jfs_inode.h =================================================================== --- linux-2.6.orig/fs/jfs/jfs_inode.h 2010-05-25 20:05:47.349272383 +0200 +++ linux-2.6/fs/jfs/jfs_inode.h 2010-05-25 20:05:53.247253736 +0200 @@ -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); Index: linux-2.6/fs/logfs/logfs.h =================================================================== --- linux-2.6.orig/fs/logfs/logfs.h 2010-05-25 20:06:03.407255482 +0200 +++ linux-2.6/fs/logfs/logfs.h 2010-05-25 20:06:08.703005588 +0200 @@ -506,7 +506,7 @@ extern const struct address_space_operat 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); Index: linux-2.6/fs/nilfs2/nilfs.h =================================================================== --- linux-2.6.orig/fs/nilfs2/nilfs.h 2010-05-25 20:06:20.964254295 +0200 +++ linux-2.6/fs/nilfs2/nilfs.h 2010-05-25 20:06:28.707255203 +0200 @@ -228,7 +228,7 @@ extern void nilfs_set_link(struct inode struct page *, struct inode *); /* file.c */ -extern int nilfs_sync_file(struct file *, struct dentry *, int); +extern int nilfs_sync_file(struct file *, int); /* ioctl.c */ long nilfs_ioctl(struct file *, unsigned int, unsigned long); Index: linux-2.6/fs/ubifs/ubifs.h =================================================================== --- linux-2.6.orig/fs/ubifs/ubifs.h 2010-05-25 20:06:38.213254295 +0200 +++ linux-2.6/fs/ubifs/ubifs.h 2010-05-25 20:06:43.021254434 +0200 @@ -1678,7 +1678,7 @@ const struct ubifs_lprops *ubifs_fast_fi int ubifs_calc_dark(const struct ubifs_info *c, int spc); /* file.c */ -int ubifs_fsync(struct file *file, struct dentry *dentry, int datasync); +int ubifs_fsync(struct file *file, int datasync); int ubifs_setattr(struct dentry *dentry, struct iattr *attr); /* dir.c */ Index: linux-2.6/include/linux/buffer_head.h =================================================================== --- linux-2.6.orig/include/linux/buffer_head.h 2010-05-25 20:04:32.866004679 +0200 +++ linux-2.6/include/linux/buffer_head.h 2010-05-25 20:04:38.544024235 +0200 @@ -224,7 +224,7 @@ int block_page_mkwrite(struct vm_area_st void block_sync_page(struct page *); sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); int block_truncate_page(struct address_space *, loff_t, get_block_t *); -int file_fsync(struct file *, struct dentry *, int); +int file_fsync(struct file *, int); int nobh_write_begin(struct file *, struct address_space *, loff_t, unsigned, unsigned, struct page **, void **, get_block_t*); Index: linux-2.6/include/linux/ext3_fs.h =================================================================== --- linux-2.6.orig/include/linux/ext3_fs.h 2010-05-25 20:07:37.733254016 +0200 +++ linux-2.6/include/linux/ext3_fs.h 2010-05-25 20:08:12.142023537 +0200 @@ -868,7 +868,7 @@ extern int ext3_htree_store_dirent(struc extern void ext3_htree_free_dir_info(struct dir_private_info *p); /* fsync.c */ -extern int ext3_sync_file (struct file *, struct dentry *, int); +extern int ext3_sync_file(struct file *, int); /* hash.c */ extern int ext3fs_dirhash(const char *name, int len, struct Index: linux-2.6/include/linux/fb.h =================================================================== --- linux-2.6.orig/include/linux/fb.h 2010-05-25 19:58:28.777254505 +0200 +++ linux-2.6/include/linux/fb.h 2010-05-25 19:58:50.287254784 +0200 @@ -4,8 +4,6 @@ #include <linux/types.h> #include <linux/i2c.h> -struct dentry; - /* Definitions of frame buffers */ #define FB_MAX 32 /* sufficient for now */ @@ -1017,8 +1015,7 @@ extern void fb_deferred_io_open(struct f struct inode *inode, struct file *file); extern void fb_deferred_io_cleanup(struct fb_info *info); -extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, - int datasync); +extern int fb_deferred_io_fsync(struct file *file, int datasync); static inline bool fb_be_math(struct fb_info *info) { Index: linux-2.6/include/trace/events/ext4.h =================================================================== --- linux-2.6.orig/include/trace/events/ext4.h 2010-05-25 20:09:01.980012711 +0200 +++ linux-2.6/include/trace/events/ext4.h 2010-05-25 20:09:30.836003980 +0200 @@ -618,9 +618,9 @@ TRACE_EVENT(ext4_free_blocks, ); TRACE_EVENT(ext4_sync_file, - TP_PROTO(struct file *file, struct dentry *dentry, int datasync), + TP_PROTO(struct file *file, int datasync), - TP_ARGS(file, dentry, datasync), + TP_ARGS(file, datasync), TP_STRUCT__entry( __field( dev_t, dev ) @@ -630,6 +630,8 @@ TRACE_EVENT(ext4_sync_file, ), TP_fast_assign( + struct dentry *dentry = file->f_path.dentry; + __entry->dev = dentry->d_inode->i_sb->s_dev; __entry->ino = dentry->d_inode->i_ino; __entry->datasync = datasync; -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html