diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 14:26:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 14:26:52 -0400 |
commit | 5f248c9c251c60af3403902b26e08de43964ea0b (patch) | |
tree | 6d3328e72a7e4015a64017eb30be18095c6a3c64 /fs/9p/vfs_inode.c | |
parent | f6cec0ae58c17522a7bc4e2f39dae19f199ab534 (diff) | |
parent | dca332528bc69e05f67161e1ed59929633d5e63d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
no need for list_for_each_entry_safe()/resetting with superblock list
Fix sget() race with failing mount
vfs: don't hold s_umount over close_bdev_exclusive() call
sysv: do not mark superblock dirty on remount
sysv: do not mark superblock dirty on mount
btrfs: remove junk sb_dirt change
BFS: clean up the superblock usage
AFFS: wait for sb synchronization when needed
AFFS: clean up dirty flag usage
cifs: truncate fallout
mbcache: fix shrinker function return value
mbcache: Remove unused features
add f_flags to struct statfs(64)
pass a struct path to vfs_statfs
update VFS documentation for method changes.
All filesystems that need invalidate_inode_buffers() are doing that explicitly
convert remaining ->clear_inode() to ->evict_inode()
Make ->drop_inode() just return whether inode needs to be dropped
fs/inode.c:clear_inode() is gone
fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
...
Fix up trivial conflicts in fs/nilfs2/super.c
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r-- | fs/9p/vfs_inode.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 6e94f3247cec..d97c34a24f7a 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -430,8 +430,10 @@ error: | |||
430 | * @inode: inode to release | 430 | * @inode: inode to release |
431 | * | 431 | * |
432 | */ | 432 | */ |
433 | void v9fs_clear_inode(struct inode *inode) | 433 | void v9fs_evict_inode(struct inode *inode) |
434 | { | 434 | { |
435 | truncate_inode_pages(inode->i_mapping, 0); | ||
436 | end_writeback(inode); | ||
435 | filemap_fdatawrite(inode->i_mapping); | 437 | filemap_fdatawrite(inode->i_mapping); |
436 | 438 | ||
437 | #ifdef CONFIG_9P_FSCACHE | 439 | #ifdef CONFIG_9P_FSCACHE |
@@ -1209,10 +1211,19 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr) | |||
1209 | } | 1211 | } |
1210 | 1212 | ||
1211 | retval = p9_client_wstat(fid, &wstat); | 1213 | retval = p9_client_wstat(fid, &wstat); |
1212 | if (retval >= 0) | 1214 | if (retval < 0) |
1213 | retval = inode_setattr(dentry->d_inode, iattr); | 1215 | return retval; |
1214 | 1216 | ||
1215 | return retval; | 1217 | if ((iattr->ia_valid & ATTR_SIZE) && |
1218 | iattr->ia_size != i_size_read(dentry->d_inode)) { | ||
1219 | retval = vmtruncate(dentry->d_inode, iattr->ia_size); | ||
1220 | if (retval) | ||
1221 | return retval; | ||
1222 | } | ||
1223 | |||
1224 | setattr_copy(dentry->d_inode, iattr); | ||
1225 | mark_inode_dirty(dentry->d_inode); | ||
1226 | return 0; | ||
1216 | } | 1227 | } |
1217 | 1228 | ||
1218 | /** | 1229 | /** |