summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.h
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2015-12-14 15:40:44 -0800
committerChris Mason <clm@fb.com>2015-12-15 09:09:38 -0800
commitbb1591b4ea1a1485ebc79be4e4748e94f96c670b (patch)
tree25dcd0b7dc78562d01c7865527d3fd46d6f99bb6 /fs/btrfs/transaction.h
parent1b9b922a3a601b0c99a095ffafed61fcf6ebe0b7 (diff)
downloadlinux-bb1591b4ea1a1485ebc79be4e4748e94f96c670b.tar.bz2
Btrfs: check prepare_uptodate_page() error code earlier
prepare_pages() may end up calling prepare_uptodate_page() twice if our write only spans a single page. But if the first call returns an error, our page will be unlocked and its not safe to call it again. This bug goes all the way back to 2011, and it's not something commonly hit. While we're here, add a more explicit check for the page being truncated away. The bare lock_page() alone is protected only by good thoughts and i_mutex, which we're sure to regret eventually. Reported-by: Dave Jones <dsj@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
0 files changed, 0 insertions, 0 deletions