[Tux3] [PATCH] tux3: fix compile error in linus-git
Qinghuang Feng
qhfeng.kernel at gmail.com
Wed Jan 7 00:27:58 PST 2009
Hello, I am that "sniper" guy. This mail account is used to post patches.
When I compiled the latest tux3 under linus-git:
fs/tux3/inode.c: In function âtux_create_inodeâ:
fs/tux3/inode.c:457: error: âstruct task_structâ has no member named âfsuidâ
fs/tux3/inode.c:458: error: âstruct task_structâ has no member named âfsgidâ
This patch fix this compile error, and the latest tux3 works fine.
Signed-off-by: Qinghuang Feng <qhfeng.kernel at gmail.com>
---
--- inode_origin.c 2009-01-07 14:00:56.000000000 +0800
+++ inode.c 2009-01-07 16:03:03.000000000 +0800
@@ -10,6 +10,16 @@
#include "tux3.h"
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)
+ #include <linux/cred.h>
+ #define tux_current_fsuid() (current_fsuid())
+ #define tux_current_fsgid() (current_fsgid())
+#else
+ #define tux_current_fsuid() (current->fsuid)
+ #define tux_current_fsgid() (current->fsgid)
+#endif
+
+
#ifndef trace
#define trace trace_on
#endif
@@ -454,8 +464,8 @@ static void tux_setup_inode(struct inode
struct inode *tux_create_inode(struct inode *dir, int mode, dev_t rdev)
{
struct tux_iattr iattr = {
- .uid = current->fsuid,
- .gid = current->fsgid,
+ .uid = tux_current_fsuid(),
+ .gid = tux_current_fsgid(),
.mode = mode,
};
struct inode *inode = tux_new_inode(dir, &iattr, rdev);
-------------- next part --------------
_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
More information about the Tux3
mailing list