diff options
-rw-r--r-- | libbb/loop.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libbb/loop.c b/libbb/loop.c index c96c5e070..d30b378d7 100644 --- a/libbb/loop.c +++ b/libbb/loop.c | |||
@@ -154,16 +154,7 @@ int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offse | |||
154 | else | 154 | else |
155 | ioctl(dfd, LOOP_CLR_FD, 0); | 155 | ioctl(dfd, LOOP_CLR_FD, 0); |
156 | } | 156 | } |
157 | 157 | } else { | |
158 | /* If this block device already set up right, re-use it. | ||
159 | * (Yes this is racy, but associating two loop devices with the same | ||
160 | * file isn't pretty either. In general, mounting the same file twice | ||
161 | * without using losetup manually is problematic.) | ||
162 | */ | ||
163 | } else | ||
164 | if (strcmp(file, (char *)loopinfo.lo_file_name) != 0 | ||
165 | || offset != loopinfo.lo_offset | ||
166 | ) { | ||
167 | rc = -1; | 158 | rc = -1; |
168 | } | 159 | } |
169 | close(dfd); | 160 | close(dfd); |