The nowrite_ops var is declared within nested block scope but used
outside that scope, causing xfs_db to crash while trying to defererence
the verify_write pointer. Fix it by lifting the declaration to the outer
scope, where it is accessed.
Fixes: b64af2c48220c8 ("xfs_db: add crc manipulation commands")
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
char **argv)
{
const struct xfs_buf_ops *stashed_ops = NULL;
+ struct xfs_buf_ops nowrite_ops;
extern char *progname;
const field_t *fields;
const ftattr_t *fa;
}
if (invalidate) {
- struct xfs_buf_ops nowrite_ops;
flist_t *sfl;
int bit_length;
int parentoffset;