Nasf-Fan 2705ebf0a7 Misc fixes and cleanup for project quota
1) The Coverity Scan reports some issues for the project
   quota patch, including:

1.1) zfs_prop_get_userquota() directly uses the const quota
   type value as the condition check by wrong.

1.2) dmu_objset_userquota_get_ids() may cause dnode::dn_newgid
   to be overwritten by dnode::dn->dn_oldprojid.

2) This patch fixes related issues. It also enhances the logic
   for zfs_project_item_alloc() to avoid buffer overflow.

3) Skip project quota ability check if does not change project
   quota related things (id or flag). Otherwise, it will cause
   chattr (for other non project quota flags) operation failed
   if project quota disabled.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Closes #7251 
Closes #7265
2018-03-05 12:56:27 -08:00
..
2018-02-28 08:57:10 -08:00
2018-02-28 08:57:10 -08:00
2013-01-09 16:54:58 -08:00
2017-12-20 09:42:07 -08:00
2018-02-13 14:54:54 -08:00
2018-02-23 11:38:05 -08:00
2017-07-25 13:22:03 -04:00
2018-02-13 14:54:54 -08:00
2018-02-05 12:00:26 -08:00
2017-08-15 17:26:38 -07:00