lkml.org 
[lkml]   [2012]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/22] bfs: drop vmtruncate
> @@ -171,8 +171,9 @@ static int bfs_write_begin(struct file *file, struct address_space *mapping,
> bfs_get_block);
> if (unlikely(ret)) {
> loff_t isize = mapping->host->i_size;
> - if (pos + len > isize)
> - vmtruncate(mapping->host, isize);
> + if ((pos + len > isize) &&
> + inode_newsize_ok(mapping->host, isize) == 0)
> + truncate_setsize(mapping->host, isize);

No need for the inode_newsize_ok in the write failure handling.



\
 
 \ /
  Last update: 2012-10-13 19:01    [W:0.038 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site