diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2016-09-15 19:17:21 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2016-09-19 04:47:01 -0400 |
commit | 5d3ddd84eaefffd23c028bce5610dac8726f71c1 (patch) | |
tree | f99fb1a9aa178bf2d4af86651199244eff2ec981 /fs/udf/file.c | |
parent | 420902c9d086848a7548c83e0a49021514bd71b7 (diff) |
udf: don't bother with full-page write optimisations in adinicb case
... it would get converted to regular if such had been attempted
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/file.c')
-rw-r--r-- | fs/udf/file.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c index 254bc02d7e2c..e855bf8d74b4 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -105,11 +105,25 @@ static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter) | |||
105 | return 0; | 105 | return 0; |
106 | } | 106 | } |
107 | 107 | ||
108 | static int udf_adinicb_write_end(struct file *file, struct address_space *mapping, | ||
109 | loff_t pos, unsigned len, unsigned copied, | ||
110 | struct page *page, void *fsdata) | ||
111 | { | ||
112 | struct inode *inode = page->mapping->host; | ||
113 | loff_t last_pos = pos + copied; | ||
114 | if (last_pos > inode->i_size) | ||
115 | i_size_write(inode, last_pos); | ||
116 | set_page_dirty(page); | ||
117 | unlock_page(page); | ||
118 | put_page(page); | ||
119 | return copied; | ||
120 | } | ||
121 | |||
108 | const struct address_space_operations udf_adinicb_aops = { | 122 | const struct address_space_operations udf_adinicb_aops = { |
109 | .readpage = udf_adinicb_readpage, | 123 | .readpage = udf_adinicb_readpage, |
110 | .writepage = udf_adinicb_writepage, | 124 | .writepage = udf_adinicb_writepage, |
111 | .write_begin = udf_adinicb_write_begin, | 125 | .write_begin = udf_adinicb_write_begin, |
112 | .write_end = simple_write_end, | 126 | .write_end = udf_adinicb_write_end, |
113 | .direct_IO = udf_adinicb_direct_IO, | 127 | .direct_IO = udf_adinicb_direct_IO, |
114 | }; | 128 | }; |
115 | 129 | ||