diff options
Diffstat (limited to 'fs/exofs/ios.c')
-rw-r--r-- | fs/exofs/ios.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/exofs/ios.c b/fs/exofs/ios.c index fbb47ba2cd71..096405e51b94 100644 --- a/fs/exofs/ios.c +++ b/fs/exofs/ios.c | |||
@@ -69,8 +69,8 @@ out: | |||
69 | return ret; | 69 | return ret; |
70 | } | 70 | } |
71 | 71 | ||
72 | int exofs_get_io_state(struct exofs_layout *layout, | 72 | int exofs_get_rw_state(struct exofs_layout *layout, bool is_reading, |
73 | struct exofs_io_state **pios) | 73 | u64 offset, u64 length, struct exofs_io_state **pios) |
74 | { | 74 | { |
75 | struct exofs_io_state *ios; | 75 | struct exofs_io_state *ios; |
76 | 76 | ||
@@ -87,10 +87,20 @@ int exofs_get_io_state(struct exofs_layout *layout, | |||
87 | 87 | ||
88 | ios->layout = layout; | 88 | ios->layout = layout; |
89 | ios->obj.partition = layout->s_pid; | 89 | ios->obj.partition = layout->s_pid; |
90 | ios->offset = offset; | ||
91 | ios->length = length; | ||
92 | ios->reading = is_reading; | ||
93 | |||
90 | *pios = ios; | 94 | *pios = ios; |
91 | return 0; | 95 | return 0; |
92 | } | 96 | } |
93 | 97 | ||
98 | int exofs_get_io_state(struct exofs_layout *layout, | ||
99 | struct exofs_io_state **ios) | ||
100 | { | ||
101 | return exofs_get_rw_state(layout, true, 0, 0, ios); | ||
102 | } | ||
103 | |||
94 | void exofs_put_io_state(struct exofs_io_state *ios) | 104 | void exofs_put_io_state(struct exofs_io_state *ios) |
95 | { | 105 | { |
96 | if (ios) { | 106 | if (ios) { |