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:
Minix: Clean up left over label
fix truncate inode time modification breakage
fix setattr error handling in sysfs, configfs
fcntl: return -EFAULT if copy_to_user fails
wrong type for 'magic' argument in simple_fill_super()
fix the deadlock in qib_fs
mqueue doesn't need make_bad_inode()

+13 -15
+1 -3
drivers/infiniband/hw/qib/qib_fs.c
··· 542 list_for_each_entry_safe(dd, tmp, &qib_dev_list, list) { 543 spin_unlock_irqrestore(&qib_devs_lock, flags); 544 ret = add_cntr_files(sb, dd); 545 - if (ret) { 546 - deactivate_super(sb); 547 goto bail; 548 - } 549 spin_lock_irqsave(&qib_devs_lock, flags); 550 } 551
··· 542 list_for_each_entry_safe(dd, tmp, &qib_dev_list, list) { 543 spin_unlock_irqrestore(&qib_devs_lock, flags); 544 ret = add_cntr_files(sb, dd); 545 + if (ret) 546 goto bail; 547 spin_lock_irqsave(&qib_devs_lock, flags); 548 } 549
+1 -1
fs/ext2/inode.c
··· 1552 if (error) 1553 return error; 1554 } 1555 - if (iattr->ia_valid & ATTR_SIZE) { 1556 error = ext2_setsize(inode, iattr->ia_size); 1557 if (error) 1558 return error;
··· 1552 if (error) 1553 return error; 1554 } 1555 + if (iattr->ia_valid & ATTR_SIZE && iattr->ia_size != inode->i_size) { 1556 error = ext2_setsize(inode, iattr->ia_size); 1557 if (error) 1558 return error;
+5 -2
fs/fcntl.c
··· 274 275 ret = copy_from_user(&owner, owner_p, sizeof(owner)); 276 if (ret) 277 - return ret; 278 279 switch (owner.type) { 280 case F_OWNER_TID: ··· 332 } 333 read_unlock(&filp->f_owner.lock); 334 335 - if (!ret) 336 ret = copy_to_user(owner_p, &owner, sizeof(owner)); 337 return ret; 338 } 339
··· 274 275 ret = copy_from_user(&owner, owner_p, sizeof(owner)); 276 if (ret) 277 + return -EFAULT; 278 279 switch (owner.type) { 280 case F_OWNER_TID: ··· 332 } 333 read_unlock(&filp->f_owner.lock); 334 335 + if (!ret) { 336 ret = copy_to_user(owner_p, &owner, sizeof(owner)); 337 + if (ret) 338 + ret = -EFAULT; 339 + } 340 return ret; 341 } 342
+2 -1
fs/libfs.c
··· 489 * unique inode values later for this filesystem, then you must take care 490 * to pass it an appropriate max_reserved value to avoid collisions. 491 */ 492 - int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files) 493 { 494 struct inode *inode; 495 struct dentry *root;
··· 489 * unique inode values later for this filesystem, then you must take care 490 * to pass it an appropriate max_reserved value to avoid collisions. 491 */ 492 + int simple_fill_super(struct super_block *s, unsigned long magic, 493 + struct tree_descr *files) 494 { 495 struct inode *inode; 496 struct dentry *root;
-4
fs/minix/dir.c
··· 75 if (!IS_ERR(page)) 76 kmap(page); 77 return page; 78 - 79 - fail: 80 - dir_put_page(page); 81 - return ERR_PTR(-EIO); 82 } 83 84 static inline void *minix_next_entry(void *de, struct minix_sb_info *sbi)
··· 75 if (!IS_ERR(page)) 76 kmap(page); 77 return page; 78 } 79 80 static inline void *minix_next_entry(void *de, struct minix_sb_info *sbi)
+1 -1
include/linux/fs.h
··· 2388 extern const struct inode_operations simple_dir_inode_operations; 2389 struct tree_descr { char *name; const struct file_operations *ops; int mode; }; 2390 struct dentry *d_alloc_name(struct dentry *, const char *); 2391 - extern int simple_fill_super(struct super_block *, int, struct tree_descr *); 2392 extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); 2393 extern void simple_release_fs(struct vfsmount **mount, int *count); 2394
··· 2388 extern const struct inode_operations simple_dir_inode_operations; 2389 struct tree_descr { char *name; const struct file_operations *ops; int mode; }; 2390 struct dentry *d_alloc_name(struct dentry *, const char *); 2391 + extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); 2392 extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); 2393 extern void simple_release_fs(struct vfsmount **mount, int *count); 2394
-1
ipc/mqueue.c
··· 176 } 177 return inode; 178 out_inode: 179 - make_bad_inode(inode); 180 iput(inode); 181 return NULL; 182 }
··· 176 } 177 return inode; 178 out_inode: 179 iput(inode); 180 return NULL; 181 }
+3 -2
mm/shmem.c
··· 764 static int shmem_notify_change(struct dentry *dentry, struct iattr *attr) 765 { 766 struct inode *inode = dentry->d_inode; 767 int error; 768 769 - if (S_ISREG(inode->i_mode) && (attr->ia_valid & ATTR_SIZE)) { 770 - loff_t newsize = attr->ia_size; 771 struct page *page = NULL; 772 773 if (newsize < inode->i_size) {
··· 764 static int shmem_notify_change(struct dentry *dentry, struct iattr *attr) 765 { 766 struct inode *inode = dentry->d_inode; 767 + loff_t newsize = attr->ia_size; 768 int error; 769 770 + if (S_ISREG(inode->i_mode) && (attr->ia_valid & ATTR_SIZE) 771 + && newsize != inode->i_size) { 772 struct page *page = NULL; 773 774 if (newsize < inode->i_size) {