]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/btrfs/scrub.c
Btrfs: fix oops when recovering the file data by scrub function
[karo-tx-linux.git] / fs / btrfs / scrub.c
index 63144e4ca9e1f0a53be9e56f8b0cf2c6d15c356a..c1647f8c1cd055f14f8968acd5fa7514b17f8bee 100644 (file)
@@ -3258,7 +3258,7 @@ static int copy_nocow_pages_for_inode(u64 inum, u64 offset, u64 root, void *ctx)
                                ret = ret_sub;
                                goto next_page;
                        }
-                       wait_on_page_locked(page);
+                       lock_page(page);
                        if (!PageUptodate(page)) {
                                ret = -EIO;
                                goto next_page;