diff options
Diffstat (limited to 'fs/reiserfs/ioctl.c')
-rw-r--r-- | fs/reiserfs/ioctl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index 11a0fcc2d402..c438a8f83f26 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c | |||
@@ -128,6 +128,10 @@ long reiserfs_compat_ioctl(struct file *file, unsigned int cmd, | |||
128 | } | 128 | } |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | int reiserfs_commit_write(struct file *f, struct page *page, | ||
132 | unsigned from, unsigned to); | ||
133 | int reiserfs_prepare_write(struct file *f, struct page *page, | ||
134 | unsigned from, unsigned to); | ||
131 | /* | 135 | /* |
132 | ** reiserfs_unpack | 136 | ** reiserfs_unpack |
133 | ** Function try to convert tail from direct item into indirect. | 137 | ** Function try to convert tail from direct item into indirect. |
@@ -175,15 +179,13 @@ static int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
175 | if (!page) { | 179 | if (!page) { |
176 | goto out; | 180 | goto out; |
177 | } | 181 | } |
178 | retval = | 182 | retval = reiserfs_prepare_write(NULL, page, write_from, write_from); |
179 | mapping->a_ops->prepare_write(NULL, page, write_from, write_from); | ||
180 | if (retval) | 183 | if (retval) |
181 | goto out_unlock; | 184 | goto out_unlock; |
182 | 185 | ||
183 | /* conversion can change page contents, must flush */ | 186 | /* conversion can change page contents, must flush */ |
184 | flush_dcache_page(page); | 187 | flush_dcache_page(page); |
185 | retval = | 188 | retval = reiserfs_commit_write(NULL, page, write_from, write_from); |
186 | mapping->a_ops->commit_write(NULL, page, write_from, write_from); | ||
187 | REISERFS_I(inode)->i_flags |= i_nopack_mask; | 189 | REISERFS_I(inode)->i_flags |= i_nopack_mask; |
188 | 190 | ||
189 | out_unlock: | 191 | out_unlock: |