From b907a8622e39eecfc4b243f3be3ad26559d1faee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Mon, 27 Jun 2016 21:01:09 -0300 Subject: Linux-libre 4.6.3-gnu --- fs/aufs/f_op.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'fs/aufs/f_op.c') diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c index b0b0fff5f..504b76751 100644 --- a/fs/aufs/f_op.c +++ b/fs/aufs/f_op.c @@ -341,11 +341,20 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter) sb = inode->i_sb; si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); - h_file = au_read_pre(file, /*keep_fi*/0); + h_file = au_read_pre(file, /*keep_fi*/1); err = PTR_ERR(h_file); if (IS_ERR(h_file)) goto out; + if (au_test_loopback_kthread()) { + au_warn_loopback(h_file->f_path.dentry->d_sb); + if (file->f_mapping != h_file->f_mapping) { + file->f_mapping = h_file->f_mapping; + smp_mb(); /* unnecessary? */ + } + } + fi_read_unlock(file); + err = au_do_iter(h_file, MAY_READ, kio, iov_iter); /* todo: necessary? */ /* file->f_ra = h_file->f_ra; */ @@ -394,20 +403,11 @@ static ssize_t aufs_splice_read(struct file *file, loff_t *ppos, sb = inode->i_sb; si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); - h_file = au_read_pre(file, /*keep_fi*/1); + h_file = au_read_pre(file, /*keep_fi*/0); err = PTR_ERR(h_file); if (IS_ERR(h_file)) goto out; - if (au_test_loopback_kthread()) { - au_warn_loopback(h_file->f_path.dentry->d_sb); - if (file->f_mapping != h_file->f_mapping) { - file->f_mapping = h_file->f_mapping; - smp_mb(); /* unnecessary? */ - } - } - fi_read_unlock(file); - err = vfsub_splice_to(h_file, ppos, pipe, len, flags); /* todo: necessasry? */ /* file->f_ra = h_file->f_ra; */ -- cgit v1.2.3