diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-01-25 17:52:46 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-01-25 17:52:46 +0300 |
commit | 47cd95a6326888a46e7ce8389cd394a3e1c647e7 (patch) | |
tree | dfbb526bcca1a4f627294f19983e1f0b43af9204 /fs/aio.c | |
parent | 9f6f941e25bad8fcffc24d10762962d62edba767 (diff) | |
parent | 883af14e67e8b8702b5560aa64c888c0cd0bd66c (diff) | |
download | linux-47cd95a6326888a46e7ce8389cd394a3e1c647e7.tar.xz |
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1085,7 +1085,8 @@ static void aio_complete(struct kiocb *kiocb, long res, long res2) * Tell lockdep we inherited freeze protection from submission * thread. */ - __sb_writers_acquired(file_inode(file)->i_sb, SB_FREEZE_WRITE); + if (S_ISREG(file_inode(file)->i_mode)) + __sb_writers_acquired(file_inode(file)->i_sb, SB_FREEZE_WRITE); file_end_write(file); } @@ -1525,7 +1526,8 @@ static ssize_t aio_write(struct kiocb *req, struct iocb *iocb, bool vectored, * by telling it the lock got released so that it doesn't * complain about held lock when we return to userspace. */ - __sb_writers_release(file_inode(file)->i_sb, SB_FREEZE_WRITE); + if (S_ISREG(file_inode(file)->i_mode)) + __sb_writers_release(file_inode(file)->i_sb, SB_FREEZE_WRITE); } kfree(iovec); return ret; |