diff options
author | Jani Nikula <jani.nikula@intel.com> | 2017-09-04 21:40:34 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2017-09-04 21:40:34 +0300 |
commit | d149d6ae17197ce23e2cd6bc5fcdacf7b593e55e (patch) | |
tree | 2fb8d66199080f6d7b41690f6e8616ccd79a1943 /fs/ext4/file.c | |
parent | afe722bee4bf8afc88c6ff7d6f781515d9428595 (diff) | |
parent | 7846b12fe0b5feab5446d892f41b5140c1419109 (diff) | |
download | linux-d149d6ae17197ce23e2cd6bc5fcdacf7b593e55e.tar.bz2 |
Merge drm-upstream/drm-next into drm-intel-next-queued
Catch up with upstream while it's easy.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
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); |