inode.c (eafdc7d190a944c755a9fe68573c193e6e0217e7) inode.c (155130a4f7848b1aac439cab6bda1a175507c71c)
1/*
2 * inode.c - NILFS inode operations.
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 183 unchanged lines hidden (view full) ---

192
193{
194 struct inode *inode = mapping->host;
195 int err = nilfs_transaction_begin(inode->i_sb, NULL, 1);
196
197 if (unlikely(err))
198 return err;
199
1/*
2 * inode.c - NILFS inode operations.
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 183 unchanged lines hidden (view full) ---

192
193{
194 struct inode *inode = mapping->host;
195 int err = nilfs_transaction_begin(inode->i_sb, NULL, 1);
196
197 if (unlikely(err))
198 return err;
199
200 *pagep = NULL;
201 err = block_write_begin(file, mapping, pos, len, flags, pagep,
202 fsdata, nilfs_get_block);
203 if (unlikely(err))
200 err = block_write_begin(mapping, pos, len, flags, pagep,
201 nilfs_get_block);
202 if (unlikely(err)) {
203 loff_t isize = mapping->host->i_size;
204 if (pos + len > isize)
205 vmtruncate(mapping->host, isize);
206
204 nilfs_transaction_abort(inode->i_sb);
207 nilfs_transaction_abort(inode->i_sb);
208 }
205 return err;
206}
207
208static int nilfs_write_end(struct file *file, struct address_space *mapping,
209 loff_t pos, unsigned len, unsigned copied,
210 struct page *page, void *fsdata)
211{
212 struct inode *inode = mapping->host;

--- 572 unchanged lines hidden ---
209 return err;
210}
211
212static int nilfs_write_end(struct file *file, struct address_space *mapping,
213 loff_t pos, unsigned len, unsigned copied,
214 struct page *page, void *fsdata)
215{
216 struct inode *inode = mapping->host;

--- 572 unchanged lines hidden ---