fixed VLAN setup: set the name-type, honor the 'ip' value and use the
[util-vserver.git] / util-vserver / kernel / xid.h
index 5d1c6c1..4848951 100644 (file)
@@ -5,9 +5,18 @@
 #warning config options missing
 #endif
 
+#define XID_TAG_SB(sb) (sb->s_flags & MS_TAGXID)
+
 #define XID_TAG(in)    (!(in) || \
        (((struct inode *)in)->i_sb && \
-       (((struct inode *)in)->i_sb->s_flags & MS_TAGXID)))
+       XID_TAG_SB(((struct inode *)in)->i_sb)))
+
+
+#ifdef CONFIG_XID_TAG_NFSD
+#define        XID_TAG_NFSD    1
+#else
+#define        XID_TAG_NFSD    0
+#endif
 
 
 #ifdef CONFIG_INOXID_NONE
 #endif
 
 
+#ifdef CONFIG_INOXID_NONE
+#define vx_current_fsxid(sb)   (0)
+#else
+#define vx_current_fsxid(sb)   \
+       (XID_TAG_SB(sb) ? current->xid : 0)
+#endif
+
 #define INOXID_UID(tag, uid, gid)      \
        ((tag) ? ((uid) & MAX_UID) : (uid))
 #define INOXID_GID(tag, uid, gid)      \