diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-14 14:50:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-14 14:50:58 -0700 |
commit | feea468014f0c2f930b149e83a9047da86b26e4e (patch) | |
tree | 29807205f471d63affd20e1e36fc3f832b55a106 /fs/ext4/file.c | |
parent | f24f27b85eadb6e6e7a68aa16c60a2d65789a02a (diff) | |
parent | ef954844c7ace62f773f4f23e28d2d915adc419f (diff) | |
download | blackbird-obmc-linux-feea468014f0c2f930b149e83a9047da86b26e4e.tar.gz blackbird-obmc-linux-feea468014f0c2f930b149e83a9047da86b26e4e.zip |
Merge 4.13-rc5 into usb-next
This gets the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r-- | fs/ext4/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 58294c9a7e1d..0d7cf0cc9b87 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -537,6 +537,8 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, lastoff = page_offset(page); bh = head = page_buffers(page); do { + if (lastoff + bh->b_size <= startoff) + goto next; if (buffer_uptodate(bh) || buffer_unwritten(bh)) { if (whence == SEEK_DATA) @@ -551,6 +553,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, unlock_page(page); goto out; } +next: lastoff += bh->b_size; bh = bh->b_this_page; } while (bh != head); |