From 7079a18f21032100bcfe216dfbda1d10c4a42357 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 24 Mar 2017 14:52:19 -0700 Subject: [PATCH] blobfs: add assert in fs_open_blob_create_cb to satisfy static checker Signed-off-by: Jim Harris Change-Id: Ia67d8a42825f7287c48729ec4d88d94a9efe430e --- lib/blobfs/blobfs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/blobfs/blobfs.c b/lib/blobfs/blobfs.c index 47a629c1b..d661374f0 100644 --- a/lib/blobfs/blobfs.c +++ b/lib/blobfs/blobfs.c @@ -761,7 +761,13 @@ fs_open_blob_create_cb(void *ctx, int bserrno) struct spdk_filesystem *fs = args->fs; if (file == NULL) { + /* + * This is from an open with CREATE flag - the file + * is now created so look it up in the file list for this + * filesystem. + */ file = fs_find_file(fs, args->op.open.name); + assert(file != NULL); args->file = file; }