summaryrefslogtreecommitdiff
path: root/fs/debugfs/inode.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2016-04-12 12:14:46 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-04 14:48:41 -0700
commit9d58f322ee18ffaca1e0b67d90ab811ad75e62a6 (patch)
tree5cefa5a1a0ba0a6bff6a15b8960c92bb6c312ab1 /fs/debugfs/inode.c
parente4c7ab76586146820b394e0176f286f5a2e70cb3 (diff)
dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros
commit 9567366fefddeaea4ed1d713270535d93a3b3c76 upstream. The READ_LOCK macro was incorrectly returning -EINVAL if dm_bm_is_read_only() was true -- it will always be true once the cache metadata transitions to read-only by dm_cache_metadata_set_read_only(). Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0). Also, all accesses of the 'cmd' argument passed to these related macros are now encapsulated in parenthesis. A follow-up patch can be developed to eliminate the use of macros in favor of pure C code. Avoiding that now given that this needs to apply to stable@. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Fixes: d14fcf3dd79 ("dm cache: make sure every metadata function checks fail_io") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/debugfs/inode.c')
0 files changed, 0 insertions, 0 deletions