diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-08 21:17:20 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-08 21:17:20 -0300 |
commit | eccbe858ce6412b96fc7cb32eb23a3592f64e5f6 (patch) | |
tree | ed4f0e52d266bffc68a5b68afcfe69882b917efb /fs/aufs/f_op.c | |
parent | 0c1ac6822620b9868cfad5b4c2c223c6cd6fbfd8 (diff) |
Linux-libre 4.4.4-gnupck-4.4.4-gnu
Diffstat (limited to 'fs/aufs/f_op.c')
-rw-r--r-- | fs/aufs/f_op.c | 24 |
1 files changed, 24 insertions, 0 deletions
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 |