[Virtio-fs] [PATCH 1/6] fuse: Continue to wait if inline reclaim returns null

Vivek Goyal vgoyal at redhat.com
Tue Jul 16 21:00:46 UTC 2019


It is possible that inline reclaim returns null. Continue to wait for free
range in that case.

Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
---
 fs/fuse/file.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index d9bada37d8ef..310fb22b31bd 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -4074,8 +4074,11 @@ static struct fuse_dax_mapping *alloc_dax_mapping_reclaim(struct fuse_conn *fc,
 		if (dmap)
 			return dmap;
 
-		if (fi->nr_dmaps)
-			return inode_reclaim_first_dmap(fc, inode);
+		if (fi->nr_dmaps) {
+			dmap = inode_reclaim_first_dmap(fc, inode);
+			if (dmap)
+				return dmap;
+		}
 		/*
 		 * There are no mappings which can be reclaimed.
 		 * Wait for one.
-- 
2.20.1




More information about the Virtio-fs mailing list