]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/quotaops.h
quota: move unmount handling into the filesystem
[mirror_ubuntu-artful-kernel.git] / include / linux / quotaops.h
index 370abb1e99cbda13b2615e8353cf5d8a67e41caf..cfa2abb1b6d1797d6ee7152912a1f088cf07b785 100644 (file)
@@ -50,6 +50,14 @@ int dquot_alloc_inode(const struct inode *inode);
 int dquot_claim_space_nodirty(struct inode *inode, qsize_t number);
 void dquot_free_inode(const struct inode *inode);
 
+int dquot_disable(struct super_block *sb, int type, unsigned int flags);
+/* Suspend quotas on remount RO */
+static inline int dquot_suspend(struct super_block *sb, int type)
+{
+       return dquot_disable(sb, type, DQUOT_SUSPENDED);
+}
+int dquot_resume(struct super_block *sb, int type);
+
 int dquot_commit(struct dquot *dquot);
 int dquot_acquire(struct dquot *dquot);
 int dquot_release(struct dquot *dquot);
@@ -67,7 +75,6 @@ int vfs_quota_on_path(struct super_block *sb, int type, int format_id,
 int vfs_quota_on_mount(struct super_block *sb, char *qf_name,
        int format_id, int type);
 int vfs_quota_off(struct super_block *sb, int type, int remount);
-int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags);
 int vfs_quota_sync(struct super_block *sb, int type, int wait);
 int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
 int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
@@ -78,7 +85,6 @@ int vfs_set_dqblk(struct super_block *sb, int type, qid_t id,
 
 int __dquot_transfer(struct inode *inode, struct dquot **transfer_to);
 int dquot_transfer(struct inode *inode, struct iattr *iattr);
-int vfs_dq_quota_on_remount(struct super_block *sb);
 
 static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type)
 {
@@ -150,16 +156,6 @@ extern const struct quotactl_ops vfs_quotactl_ops;
 #define sb_dquot_ops (&dquot_operations)
 #define sb_quotactl_ops (&vfs_quotactl_ops)
 
-/* Cannot be called inside a transaction */
-static inline int vfs_dq_off(struct super_block *sb, int remount)
-{
-       int ret = -ENOSYS;
-
-       if (sb->s_qcop && sb->s_qcop->quota_off)
-               ret = sb->s_qcop->quota_off(sb, -1, remount);
-       return ret;
-}
-
 #else
 
 static inline int sb_has_quota_usage_enabled(struct super_block *sb, int type)
@@ -226,16 +222,6 @@ static inline void dquot_free_inode(const struct inode *inode)
 {
 }
 
-static inline int vfs_dq_off(struct super_block *sb, int remount)
-{
-       return 0;
-}
-
-static inline int vfs_dq_quota_on_remount(struct super_block *sb)
-{
-       return 0;
-}
-
 static inline int dquot_transfer(struct inode *inode, struct iattr *iattr)
 {
        return 0;
@@ -262,6 +248,22 @@ static inline int dquot_claim_space_nodirty(struct inode *inode, qsize_t number)
        return 0;
 }
 
+static inline int dquot_disable(struct super_block *sb, int type,
+               unsigned int flags)
+{
+       return 0;
+}
+
+static inline int dquot_suspend(struct super_block *sb, int type)
+{
+       return 0;
+}
+
+static inline int dquot_resume(struct super_block *sb, int type)
+{
+       return 0;
+}
+
 #define dquot_file_open                generic_file_open
 
 #endif /* CONFIG_QUOTA */