ceph: pass down the flags to grab_cache_page_write_begin
authorJeff Layton <jlayton@kernel.org>
Tue, 10 Nov 2020 21:24:40 +0000 (16:24 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 14 Dec 2020 22:21:47 +0000 (23:21 +0100)
write_begin operations are passed a flags parameter that we need to
mirror here, so that we don't (e.g.) recurse back into filesystem code
inappropriately.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c

index e10b07e..9505529 100644 (file)
@@ -1321,7 +1321,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
        dout("write_begin file %p inode %p page %p %d~%d\n", file, inode, page, (int)pos, (int)len);
 
        for (;;) {
-               page = grab_cache_page_write_begin(mapping, index, 0);
+               page = grab_cache_page_write_begin(mapping, index, flags);
                if (!page) {
                        r = -ENOMEM;
                        break;