diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-02-01 09:12:25 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-02-01 09:12:25 +0100 |
commit | ed5c8c854f2b990dfa4d85c4995d115768a05d3c (patch) | |
tree | a4a826795ec6784f25bebade98bdb20121d9c211 /fs/aio.c | |
parent | 619bd4a71874a8fd78eb6ccf9f272c5e98bcc7b7 (diff) | |
parent | a2ca3d617944417e9dd5f09fc8a4549cda115f4f (diff) | |
download | linux-ed5c8c854f2b990dfa4d85c4995d115768a05d3c.tar.bz2 |
Merge branch 'linus' into sched/core, to pick up fixes and refresh the branch
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; |