diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 11:57:53 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 11:57:53 +0100 |
| commit | a47b66da0380dd1ebcf2fbfa5fc41c4b6af8a460 (patch) | |
| tree | 3e1e18183f2041d534a1a763af95df1ec460e044 /fs/aio.c | |
| parent | 1129d270cbfbb7e2b1ec3dede4a13930bdd10e41 (diff) | |
| parent | 49def1853334396f948dcb4cedb9347abb318df5 (diff) | |
Merge 4.10-rc4 into usb-next
We need the USB fixes in here to make merges easier/possible with the
other sub-maintainer USB trees.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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; |
