/* ---------------------------------------------------------------------- */
-#if 0
static int au_do_fsync_dir_no_file(struct dentry *dentry, int datasync)
{
int err;
return err;
}
-#endif
static int au_do_fsync_dir(struct file *file, int datasync)
{
/*
* @file may be NULL
*/
-static int aufs_fsync_dir(struct file *file, int datasync)
+static int aufs_fsync_dir(struct file *file, struct dentry *dentry,
+ int datasync)
{
int err;
struct super_block *sb;
- struct dentry *dentry;
-
- if (!file) {
- WARN_ON(1);
- return -ENOTSUPP;
- }
- dentry = file->f_dentry;
IMustLock(dentry->d_inode);
si_noflush_read_lock(sb);
if (file)
err = au_do_fsync_dir(file, datasync);
-/*
else {
di_write_lock_child(dentry);
err = au_do_fsync_dir_no_file(dentry, datasync);
}
-*/
au_cpup_attr_timesizes(dentry->d_inode);
di_write_unlock(dentry);
if (file)
/* ---------------------------------------------------------------------- */
-static int aufs_fsync_nondir(struct file *file, int datasync)
+static int aufs_fsync_nondir(struct file *file, struct dentry *dentry,
+ int datasync)
{
int err;
struct au_pin pin;
struct inode *inode;
struct file *h_file;
struct super_block *sb;
- struct dentry *dentry = file->f_dentry;
inode = dentry->d_inode;
IMustLock(file->f_mapping->host);
h_d = h_file->f_dentry;
h_mtx = &h_d->d_inode->i_mutex;
mutex_lock_nested(h_mtx, AuLsc_I_CHILD);
- err = h_file->f_op->fsync(h_file, datasync);
+ err = h_file->f_op->fsync(h_file, h_d, datasync);
if (!err)
vfsub_update_h_iattr(&h_file->f_path, /*did*/NULL);
/*ignore*/