1. 04 Nov, 2019 6 commits
    • Jan Kara's avatar
      quota: Make dquot_disable() work without quota inodes · 2ec1f301
      Jan Kara authored
      Quota on and quota off are protected by s_umount semaphore held in
      exclusive mode since commit 7d6cd73d "quota: Hold s_umount in
      exclusive mode when enabling / disabling quotas". This makes it
      impossible for dquot_disable() to race with other enabling or disabling
      of quotas. Simplify the cleanup done by dquot_disable() based on this
      fact and also remove some stale comments. As a bonus this cleanup makes
      dquot_disable() properly handle a case when there are no quota inodes.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      2ec1f301
    • Jan Kara's avatar
      quota: Drop dquot_enable() · 069a9166
      Jan Kara authored
      Now dquot_enable() has only two internal callers and both of them just
      need to update quota flags and don't need most of checks. Just drop
      dquot_enable() and fold necessary functionality into the two calling
      places.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      069a9166
    • Jan Kara's avatar
      fs: Use dquot_load_quota_inode() from filesystems · 7212b95e
      Jan Kara authored
      Use dquot_load_quota_inode from filesystems instead of dquot_enable().
      In all three cases we want to load quota inode and never use the
      function to update quota flags.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      7212b95e
    • Jan Kara's avatar
      quota: Rename vfs_load_quota_inode() to dquot_load_quota_inode() · dc19432a
      Jan Kara authored
      Rename vfs_load_quota_inode() to dquot_load_quota_inode() to be
      consistent with naming of other functions used for enabling quota
      accounting from filesystems. Also export the function and add some
      sanity checks to assure filesystems are calling the function properly.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      dc19432a
    • Jan Kara's avatar
      quota: Simplify dquot_resume() · ae45f07d
      Jan Kara authored
      We already have quota inode loaded when resuming quotas. Use
      vfs_load_quota() to avoid some pointless churn with the quota inode.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      ae45f07d
    • Jan Kara's avatar
      quota: Factor out setup of quota inode · c7d3d283
      Jan Kara authored
      Factor out setting up of quota inode and eventual error cleanup from
      vfs_load_quota_inode(). This will simplify situation for filesystems
      that don't have any quota inodes.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      c7d3d283
  2. 14 Oct, 2019 18 commits
  3. 13 Oct, 2019 16 commits