summaryrefslogtreecommitdiff
path: root/fs/aufs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aufs')
-rw-r--r--fs/aufs/cpup.c4
-rw-r--r--fs/aufs/f_op.c24
2 files changed, 27 insertions, 1 deletions
diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c
index d34a6d283..cadb3adb7 100644
--- a/fs/aufs/cpup.c
+++ b/fs/aufs/cpup.c
@@ -527,6 +527,8 @@ static int au_reset_acl(struct inode *h_dir, struct path *h_path, umode_t mode)
/* forget_all_cached_acls(h_inode)); */
err = vfsub_removexattr(h_dentry, XATTR_NAME_POSIX_ACL_ACCESS);
AuTraceErr(err);
+ if (err == -EOPNOTSUPP)
+ err = 0;
if (!err)
err = vfsub_acl_chmod(h_inode, mode);
@@ -605,7 +607,7 @@ int cpup_entry(struct au_cp_generic *cpg, struct dentry *dst_parent,
switch (mode & S_IFMT) {
case S_IFREG:
isreg = 1;
- err = vfsub_create(h_dir, &h_path, mode | S_IWUSR,
+ err = vfsub_create(h_dir, &h_path, S_IRUSR | S_IWUSR,
/*want_excl*/true);
if (!err)
err = au_do_cpup_regular(cpg, h_src_attr);
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
index 2baacd7a6..145dec870 100644
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -688,6 +688,29 @@ out:
return err;
}
+static int aufs_setfl(struct file *file, unsigned long arg)
+{
+ int err;
+ struct file *h_file;
+ struct super_block *sb;
+
+ sb = file->f_path.dentry->d_sb;
+ si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW);
+
+ h_file = au_read_pre(file, /*keep_fi*/0);
+ err = PTR_ERR(h_file);
+ if (IS_ERR(h_file))
+ goto out;
+
+ arg |= vfsub_file_flags(file) & FASYNC; /* stop calling h_file->fasync */
+ err = setfl(/*unused fd*/-1, h_file, arg);
+ fput(h_file); /* instead of au_read_post() */
+
+out:
+ si_read_unlock(sb);
+ return err;
+}
+
/* ---------------------------------------------------------------------- */
/* no one supports this operation, currently */
@@ -725,6 +748,7 @@ const struct file_operations aufs_file_fop = {
/* .aio_fsync = aufs_aio_fsync_nondir, */
.fasync = aufs_fasync,
/* .sendpage = aufs_sendpage, */
+ .setfl = aufs_setfl,
.splice_write = aufs_splice_write,
.splice_read = aufs_splice_read,
#if 0