diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 20:29:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 20:29:38 -0400 |
commit | 374e55251cacfb68d331bb8a574b2de8160aacc2 (patch) | |
tree | bfd63d39be388c59157610b410003c7dcd4f0963 /fs/udf/file.c | |
parent | 978ca164bd9f30bd51f71dad86d8c3797f7add76 (diff) | |
parent | 6f644e5f97cc8dcb8dc7133562159cc20d27c38f (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
UDF: Fix compiler warning
udf: Convert UDF to new truncate calling sequence
Diffstat (limited to 'fs/udf/file.c')
-rw-r--r-- | fs/udf/file.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c index 89c78486cbbe..f391a2adc699 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -123,8 +123,8 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
123 | if (inode->i_sb->s_blocksize < | 123 | if (inode->i_sb->s_blocksize < |
124 | (udf_file_entry_alloc_offset(inode) + | 124 | (udf_file_entry_alloc_offset(inode) + |
125 | pos + count)) { | 125 | pos + count)) { |
126 | udf_expand_file_adinicb(inode, pos + count, &err); | 126 | err = udf_expand_file_adinicb(inode); |
127 | if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { | 127 | if (err) { |
128 | udf_debug("udf_expand_adinicb: err=%d\n", err); | 128 | udf_debug("udf_expand_adinicb: err=%d\n", err); |
129 | up_write(&iinfo->i_data_sem); | 129 | up_write(&iinfo->i_data_sem); |
130 | return err; | 130 | return err; |
@@ -237,7 +237,7 @@ static int udf_setattr(struct dentry *dentry, struct iattr *attr) | |||
237 | 237 | ||
238 | if ((attr->ia_valid & ATTR_SIZE) && | 238 | if ((attr->ia_valid & ATTR_SIZE) && |
239 | attr->ia_size != i_size_read(inode)) { | 239 | attr->ia_size != i_size_read(inode)) { |
240 | error = vmtruncate(inode, attr->ia_size); | 240 | error = udf_setsize(inode, attr->ia_size); |
241 | if (error) | 241 | if (error) |
242 | return error; | 242 | return error; |
243 | } | 243 | } |
@@ -249,5 +249,4 @@ static int udf_setattr(struct dentry *dentry, struct iattr *attr) | |||
249 | 249 | ||
250 | const struct inode_operations udf_file_inode_operations = { | 250 | const struct inode_operations udf_file_inode_operations = { |
251 | .setattr = udf_setattr, | 251 | .setattr = udf_setattr, |
252 | .truncate = udf_truncate, | ||
253 | }; | 252 | }; |