quota: Remove dqonoff_mutex
[sfrench/cifs-2.6.git] / include / linux / quota.h
index 8486d27cf360bca4a33295cc0bfcbf49e0a84cd3..b281d198ee5bc73fee718feec853b211017f1f46 100644 (file)
@@ -179,6 +179,16 @@ static inline struct kqid make_kqid_projid(kprojid_t projid)
        return kqid;
 }
 
+/**
+ *     qid_has_mapping - Report if a qid maps into a user namespace.
+ *     @ns:  The user namespace to see if a value maps into.
+ *     @qid: The kernel internal quota identifier to test.
+ */
+static inline bool qid_has_mapping(struct user_namespace *ns, struct kqid qid)
+{
+       return from_kqid(ns, qid) != (qid_t) -1;
+}
+
 
 extern spinlock_t dq_data_lock;
 
@@ -510,7 +520,6 @@ static inline void quota_send_warning(struct kqid qid, dev_t dev,
 struct quota_info {
        unsigned int flags;                     /* Flags for diskquotas on this device */
        struct mutex dqio_mutex;                /* lock device while I/O in progress */
-       struct mutex dqonoff_mutex;             /* Serialize quotaon & quotaoff */
        struct inode *files[MAXQUOTAS];         /* inodes of quotafiles */
        struct mem_dqinfo info[MAXQUOTAS];      /* Information for each quota type */
        const struct quota_format_ops *ops[MAXQUOTAS];  /* Operations for each type */