From: Linus Torvalds Date: Thu, 7 Sep 2017 22:19:35 +0000 (-0700) Subject: Merge branch 'quota_scaling' of git://git.kernel.org/pub/scm/linux/kernel/git/jack... X-Git-Tag: v4.14-rc1~103 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae8ac6b7dbfd67f883050421fd195c153d02f5f3;p=platform%2Fkernel%2Flinux-exynos.git Merge branch 'quota_scaling' of git://git./linux/kernel/git/jack/linux-fs Pull quota scaling updates from Jan Kara: "This contains changes to make the quota subsystem more scalable. Reportedly it improves number of files created per second on ext4 filesystem on fast storage by about a factor of 2x" * 'quota_scaling' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (28 commits) quota: Add lock annotations to struct members quota: Reduce contention on dq_data_lock fs: Provide __inode_get_bytes() quota: Inline dquot_[re]claim_reserved_space() into callsite quota: Inline inode_{incr,decr}_space() into callsites quota: Inline functions into their callsites ext4: Disable dirty list tracking of dquots when journalling quotas quota: Allow disabling tracking of dirty dquots in a list quota: Remove dq_wait_unused from dquot quota: Move locking into clear_dquot_dirty() quota: Do not dirty bad dquots quota: Fix possible corruption of dqi_flags quota: Propagate ->quota_read errors from v2_read_file_info() quota: Fix error codes in v2_read_file_info() quota: Push dqio_sem down to ->read_file_info() quota: Push dqio_sem down to ->write_file_info() quota: Push dqio_sem down to ->get_next_id() quota: Push dqio_sem down to ->release_dqblk() quota: Remove locking for writing to the old quota format quota: Do not acquire dqio_sem for dquot overwrites in v2 format ... --- ae8ac6b7dbfd67f883050421fd195c153d02f5f3 diff --cc fs/quota/quota_v2.c index 2259329,cdbf716..c0187cd --- a/fs/quota/quota_v2.c +++ b/fs/quota/quota_v2.c @@@ -106,12 -114,19 +114,17 @@@ static int v2_read_file_info(struct sup sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF); if (size != sizeof(struct v2_disk_dqinfo)) { quota_error(sb, "Can't read info structure"); - return -1; + if (size < 0) + ret = size; + else + ret = -EIO; + goto out; } info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS); - if (!info->dqi_priv) - return -ENOMEM; - + if (!info->dqi_priv) { - printk(KERN_WARNING - "Not enough memory for quota information structure.\n"); + ret = -ENOMEM; + goto out; + } qinfo = info->dqi_priv; if (version == 0) { /* limits are stored as unsigned 32-bit data */