aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 14:26:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 14:26:52 -0400
commit5f248c9c251c60af3403902b26e08de43964ea0b (patch)
tree6d3328e72a7e4015a64017eb30be18095c6a3c64 /drivers/staging
parentf6cec0ae58c17522a7bc4e2f39dae19f199ab534 (diff)
parentdca332528bc69e05f67161e1ed59929633d5e63d (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 'drivers/staging')
-rw-r--r--drivers/staging/pohmelfs/inode.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index bc1c6051a6f6..97dae297ca3c 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -968,12 +968,18 @@ int pohmelfs_setattr_raw(struct inode *inode, struct iattr *attr)
968 goto err_out_exit; 968 goto err_out_exit;
969 } 969 }
970 970
971 err = inode_setattr(inode, attr); 971 if ((attr->ia_valid & ATTR_SIZE) &&
972 if (err) { 972 attr->ia_size != i_size_read(inode)) {
973 dprintk("%s: ino: %llu, failed to set the attributes.\n", __func__, POHMELFS_I(inode)->ino); 973 err = vmtruncate(inode, attr->ia_size);
974 goto err_out_exit; 974 if (err) {
975 dprintk("%s: ino: %llu, failed to set the attributes.\n", __func__, POHMELFS_I(inode)->ino);
976 goto err_out_exit;
977 }
975 } 978 }
976 979
980 setattr_copy(inode, attr);
981 mark_inode_dirty(inode);
982
977 dprintk("%s: ino: %llu, mode: %o -> %o, uid: %u -> %u, gid: %u -> %u, size: %llu -> %llu.\n", 983 dprintk("%s: ino: %llu, mode: %o -> %o, uid: %u -> %u, gid: %u -> %u, size: %llu -> %llu.\n",
978 __func__, POHMELFS_I(inode)->ino, inode->i_mode, attr->ia_mode, 984 __func__, POHMELFS_I(inode)->ino, inode->i_mode, attr->ia_mode,
979 inode->i_uid, attr->ia_uid, inode->i_gid, attr->ia_gid, inode->i_size, attr->ia_size); 985 inode->i_uid, attr->ia_uid, inode->i_gid, attr->ia_gid, inode->i_size, attr->ia_size);
@@ -1217,7 +1223,7 @@ void pohmelfs_fill_inode(struct inode *inode, struct netfs_inode_info *info)
1217 } 1223 }
1218} 1224}
1219 1225
1220static void pohmelfs_drop_inode(struct inode *inode) 1226static int pohmelfs_drop_inode(struct inode *inode)
1221{ 1227{
1222 struct pohmelfs_sb *psb = POHMELFS_SB(inode->i_sb); 1228 struct pohmelfs_sb *psb = POHMELFS_SB(inode->i_sb);
1223 struct pohmelfs_inode *pi = POHMELFS_I(inode); 1229 struct pohmelfs_inode *pi = POHMELFS_I(inode);
@@ -1226,7 +1232,7 @@ static void pohmelfs_drop_inode(struct inode *inode)
1226 list_del_init(&pi->inode_entry); 1232 list_del_init(&pi->inode_entry);
1227 spin_unlock(&psb->ino_lock); 1233 spin_unlock(&psb->ino_lock);
1228 1234
1229 generic_drop_inode(inode); 1235 return generic_drop_inode(inode);
1230} 1236}
1231 1237
1232static struct pohmelfs_inode *pohmelfs_get_inode_from_list(struct pohmelfs_sb *psb, 1238static struct pohmelfs_inode *pohmelfs_get_inode_from_list(struct pohmelfs_sb *psb,