summaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-06-09 06:19:18 -0400
committerJens Axboe <axboe@fb.com>2017-06-09 10:18:42 -0400
commitb040ad9cf6a169cc000a5324fcada695dfa1f4b3 (patch)
treecb1d3664599b8acdb17816467919c06b8cf4b04c /drivers/block/loop.c
parentf2c6df7dbf9a60e1cd9941f9fb376d4d9ad1e8dd (diff)
loop: fix error handling regression
gcc points out an unusual indentation: drivers/block/loop.c: In function 'loop_set_status': drivers/block/loop.c:1149:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit, ^~ drivers/block/loop.c:1152:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' goto exit; This was introduced by a new feature that accidentally moved the opening braces from one condition to another. Adding a second pair of braces makes it work correctly again and also more readable. Fixes: f2c6df7dbf9a ("loop: support 4k physical blocksize") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 4d376c10a97a..e288fb30100f 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1147,10 +1147,11 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
1147 ((lo->lo_flags & LO_FLAGS_BLOCKSIZE) && 1147 ((lo->lo_flags & LO_FLAGS_BLOCKSIZE) &&
1148 lo->lo_logical_blocksize != LO_INFO_BLOCKSIZE(info))) { 1148 lo->lo_logical_blocksize != LO_INFO_BLOCKSIZE(info))) {
1149 if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit, 1149 if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit,
1150 LO_INFO_BLOCKSIZE(info))) 1150 LO_INFO_BLOCKSIZE(info))) {
1151 err = -EFBIG; 1151 err = -EFBIG;
1152 goto exit; 1152 goto exit;
1153 } 1153 }
1154 }
1154 1155
1155 loop_config_discard(lo); 1156 loop_config_discard(lo);
1156 1157