diff options
author | Andy Whitcroft <apw@canonical.com> | 2010-06-03 08:40:41 +0100 |
---|---|---|
committer | Leann Ogasawara <leann.ogasawara@canonical.com> | 2010-09-02 13:43:45 -0700 |
commit | c0b4a32572ce935ec02982b549afb77e44e446bb (patch) | |
tree | 9d1a8c659ecd3036e2b3b19a993a662f791f02cc /ubuntu | |
parent | 412ac180042e78c0a2d92083be77d29bd85efe70 (diff) |
UBUNTU: ubuntu: AUFS -- track changes to the arguements to fop fsync()
The file operation fsync dropped an unused struct dentry parameter,
apply this change to aufs2:
commit 7ea8085910ef3dd4f3cad6845aaa2b580d39b115
Author: Christoph Hellwig <hch@lst.de>
Date: Wed May 26 17:53:25 2010 +0200
drop unused dentry argument to ->fsync
WARNING: this currently removes support for syncing some forms of aufs
directory as we are now required to have a filp to sync against and aufs
does not always have them. I have added a WARN_ON to try and track the
triggers for this mode if any.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'ubuntu')
-rw-r--r-- | ubuntu/aufs/dir.c | 14 | ||||
-rw-r--r-- | ubuntu/aufs/f_op.c | 6 |
2 files changed, 15 insertions, 5 deletions
diff --git a/ubuntu/aufs/dir.c b/ubuntu/aufs/dir.c index 6ff01bc9e1e..0c0b2757391 100644 --- a/ubuntu/aufs/dir.c +++ b/ubuntu/aufs/dir.c @@ -259,6 +259,7 @@ static int aufs_flush_dir(struct file *file, fl_owner_t id) /* ---------------------------------------------------------------------- */ +#if 0 static int au_do_fsync_dir_no_file(struct dentry *dentry, int datasync) { int err; @@ -303,6 +304,7 @@ static int au_do_fsync_dir_no_file(struct dentry *dentry, int datasync) return err; } +#endif static int au_do_fsync_dir(struct file *file, int datasync) { @@ -342,11 +344,17 @@ static int au_do_fsync_dir(struct file *file, int datasync) /* * @file may be NULL */ -static int aufs_fsync_dir(struct file *file, struct dentry *dentry, - int datasync) +static int aufs_fsync_dir(struct file *file, 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); @@ -355,10 +363,12 @@ static int aufs_fsync_dir(struct file *file, struct dentry *dentry, 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) diff --git a/ubuntu/aufs/f_op.c b/ubuntu/aufs/f_op.c index 18eaa8167e4..81ccb836ad3 100644 --- a/ubuntu/aufs/f_op.c +++ b/ubuntu/aufs/f_op.c @@ -682,14 +682,14 @@ static int aufs_mmap(struct file *file, struct vm_area_struct *vma) /* ---------------------------------------------------------------------- */ -static int aufs_fsync_nondir(struct file *file, struct dentry *dentry, - int datasync) +static int aufs_fsync_nondir(struct file *file, 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); @@ -728,7 +728,7 @@ static int aufs_fsync_nondir(struct file *file, struct dentry *dentry, 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, h_d, datasync); + err = h_file->f_op->fsync(h_file, datasync); if (!err) vfsub_update_h_iattr(&h_file->f_path, /*did*/NULL); /*ignore*/ |