diff options
author | Jeff Moyer <jmoyer@redhat.com> | 2012-03-05 10:19:52 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-03-05 10:19:52 -0500 |
commit | 93ef8541d5c3ad1a73057ff358a49d0ee7146d6f (patch) | |
tree | 70c2a7cac370084edac29ee0156f52d488ee32ab | |
parent | f70486055ee351158bd6999f3965ad378b52c694 (diff) |
ext4: clean up the flags passed to __blockdev_direct_IO
For extent-based files, you can perform DIO to holes, as mentioned in
the comments in ext4_ext_direct_IO. However, that function passes
DIO_SKIP_HOLES to __blockdev_direct_IO, which is *really* confusing to
the uninitiated reader. The key, here, is that the get_block function
passed in, ext4_get_block_write, completely ignores the create flag
that is passed to it (the create flag is passed in from the direct I/O
code, which uses the DIO_SKIP_HOLES flag to determine whether or not
it should be cleared).
This is a long-winded way of saying that the DIO_SKIP_HOLES flag is
ultimately ignored. So let's remove it.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 38dc5f3e9dd3..5f8081c38032 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -2941,7 +2941,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, | |||
2941 | ext4_get_block_write, | 2941 | ext4_get_block_write, |
2942 | ext4_end_io_dio, | 2942 | ext4_end_io_dio, |
2943 | NULL, | 2943 | NULL, |
2944 | DIO_LOCKING | DIO_SKIP_HOLES); | 2944 | DIO_LOCKING); |
2945 | if (iocb->private) | 2945 | if (iocb->private) |
2946 | EXT4_I(inode)->cur_aio_dio = NULL; | 2946 | EXT4_I(inode)->cur_aio_dio = NULL; |
2947 | /* | 2947 | /* |