+4
-5
fs/direct-io.c
+4
-5
fs/direct-io.c
···
71
71
been performed at the start of a
72
72
write */
73
73
int pages_in_io; /* approximate total IO pages */
74
-
size_t size; /* total request size (doesn't change)*/
75
74
sector_t block_in_file; /* Current offset into the underlying
76
75
file in dio_block units. */
77
76
unsigned blocks_available; /* At block_in_file. changes */
···
1103
1104
unsigned blkbits = i_blkbits;
1104
1105
unsigned blocksize_mask = (1 << blkbits) - 1;
1105
1106
ssize_t retval = -EINVAL;
1106
-
loff_t end = offset + iov_iter_count(iter);
1107
+
size_t count = iov_iter_count(iter);
1108
+
loff_t end = offset + count;
1107
1109
struct dio *dio;
1108
1110
struct dio_submit sdio = { 0, };
1109
1111
struct buffer_head map_bh = { 0, };
···
1287
1287
*/
1288
1288
BUG_ON(retval == -EIOCBQUEUED);
1289
1289
if (dio->is_async && retval == 0 && dio->result &&
1290
-
((rw == READ) || (dio->result == sdio.size)))
1290
+
(rw == READ || dio->result == count))
1291
1291
retval = -EIOCBQUEUED;
1292
-
1293
-
if (retval != -EIOCBQUEUED)
1292
+
else
1294
1293
dio_await_completion(dio);
1295
1294
1296
1295
if (drop_refcount(dio) == 0) {
+2
-3
fs/open.c
+2
-3
fs/open.c
···
263
263
return -EPERM;
264
264
265
265
/*
266
-
* We can not allow to do any fallocate operation on an active
267
-
* swapfile
266
+
* We cannot allow any fallocate operation on an active swapfile
268
267
*/
269
268
if (IS_SWAPFILE(inode))
270
-
ret = -ETXTBSY;
269
+
return -ETXTBSY;
271
270
272
271
/*
273
272
* Revalidate the write permissions, in case security policy has