Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
[cascardo/linux.git] / include / linux / quota.h
index 8486d27..55107a8 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;