Commit 46c98c6d authored by Trond Myklebust's avatar Trond Myklebust

pNFS/flexfiles: Don't attempt to send layoutstats if there are no entries

If the list of mirrors is empty, then don't send an RPC call.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 1bcf4c5c
...@@ -2250,6 +2250,11 @@ ff_layout_prepare_layoutstats(struct nfs42_layoutstat_args *args) ...@@ -2250,6 +2250,11 @@ ff_layout_prepare_layoutstats(struct nfs42_layoutstat_args *args)
args->num_dev = ff_layout_mirror_prepare_stats(args, args->num_dev = ff_layout_mirror_prepare_stats(args,
&ff_layout->generic_hdr, dev_count); &ff_layout->generic_hdr, dev_count);
spin_unlock(&args->inode->i_lock); spin_unlock(&args->inode->i_lock);
if (!args->num_dev) {
kfree(args->devinfo);
args->devinfo = NULL;
return -ENOENT;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment