diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-10-18 18:24:26 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:31 -0400 |
commit | 1b783a690dd51a64f58091d060468f7c32f13f20 (patch) | |
tree | fe605aa058f30e180fad2bd2a66d7db489c0384d | |
parent | 6d01598ecd151b22feff9d8bc7f0611adacc5f28 (diff) |
bcachefs: Add pagecache_add lock to buffered IO path, fault path
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/fs-io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 37c81a664430..3475b388d2fa 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -571,13 +571,13 @@ vm_fault_t bch2_page_mkwrite(struct vm_fault *vmf) } bch2_set_page_dirty(c, inode, page, &res, 0, len); + bch2_page_reservation_put(c, inode, &res); + wait_for_stable_page(page); out: bch2_pagecache_add_put(&inode->ei_pagecache_lock); sb_end_pagefault(inode->v.i_sb); - bch2_page_reservation_put(c, inode, &res); - return ret; } |