Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull quota & reiserfs changes from Jan Kara:

- two error checking improvements for quota

- remove bogus i_version increase for reiserfs

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
quota: Check for register_shrinker() failure.
quota: propagate error from __dquot_initialize
reiserfs: remove unneeded i_version bump

+15 -8
+15 -7
fs/quota/dquot.c
··· 941 941 } 942 942 943 943 /* This routine is guarded by s_umount semaphore */ 944 - static void add_dquot_ref(struct super_block *sb, int type) 944 + static int add_dquot_ref(struct super_block *sb, int type) 945 945 { 946 946 struct inode *inode, *old_inode = NULL; 947 947 #ifdef CONFIG_QUOTA_DEBUG 948 948 int reserved = 0; 949 949 #endif 950 + int err = 0; 950 951 951 952 spin_lock(&sb->s_inode_list_lock); 952 953 list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { ··· 967 966 reserved = 1; 968 967 #endif 969 968 iput(old_inode); 970 - __dquot_initialize(inode, type); 969 + err = __dquot_initialize(inode, type); 970 + if (err) { 971 + iput(inode); 972 + goto out; 973 + } 971 974 972 975 /* 973 976 * We hold a reference to 'inode' so it couldn't have been ··· 986 981 } 987 982 spin_unlock(&sb->s_inode_list_lock); 988 983 iput(old_inode); 989 - 984 + out: 990 985 #ifdef CONFIG_QUOTA_DEBUG 991 986 if (reserved) { 992 987 quota_error(sb, "Writes happened before quota was turned on " ··· 994 989 "Please run quotacheck(8)"); 995 990 } 996 991 #endif 992 + return err; 997 993 } 998 994 999 995 /* ··· 2385 2379 dqopt->flags |= dquot_state_flag(flags, type); 2386 2380 spin_unlock(&dq_state_lock); 2387 2381 2388 - add_dquot_ref(sb, type); 2382 + error = add_dquot_ref(sb, type); 2383 + if (error) 2384 + dquot_disable(sb, type, flags); 2389 2385 2390 - return 0; 2391 - 2386 + return error; 2392 2387 out_file_init: 2393 2388 dqopt->files[type] = NULL; 2394 2389 iput(inode); ··· 2992 2985 pr_info("VFS: Dquot-cache hash table entries: %ld (order %ld," 2993 2986 " %ld bytes)\n", nr_hash, order, (PAGE_SIZE << order)); 2994 2987 2995 - register_shrinker(&dqcache_shrinker); 2988 + if (register_shrinker(&dqcache_shrinker)) 2989 + panic("Cannot register dquot shrinker"); 2996 2990 2997 2991 return 0; 2998 2992 }
-1
fs/reiserfs/super.c
··· 2591 2591 return err; 2592 2592 if (inode->i_size < off + len - towrite) 2593 2593 i_size_write(inode, off + len - towrite); 2594 - inode->i_version++; 2595 2594 inode->i_mtime = inode->i_ctime = current_time(inode); 2596 2595 mark_inode_dirty(inode); 2597 2596 return len - towrite;