Commit da664ada authored by Urban Widmark's avatar Urban Widmark Committed by Linus Torvalds

[SMBFS]: Create OLD_TO_NEW_foo macros in highuid.h and use

them instead of direct references to low2highfoo.
parent 1eb85718
......@@ -551,8 +551,8 @@ int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
if (ver == SMB_MOUNT_OLDVERSION) {
mnt->version = oldmnt->version;
mnt->uid = low2highuid(oldmnt->uid);
mnt->gid = low2highuid(oldmnt->gid);
mnt->uid = OLD_TO_NEW_UID(oldmnt->uid);
mnt->gid = OLD_TO_NEW_GID(oldmnt->gid);
mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG;
mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;
......
......@@ -56,6 +56,8 @@ extern int overflowgid;
#define SET_GID16(var, gid) var = high2lowgid(gid)
#define NEW_TO_OLD_UID(uid) high2lowuid(uid)
#define NEW_TO_OLD_GID(gid) high2lowgid(gid)
#define OLD_TO_NEW_UID(uid) low2highuid(uid)
#define OLD_TO_NEW_GID(gid) low2highgid(gid)
/* specific to fs/stat.c */
#define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
......@@ -69,6 +71,8 @@ extern int overflowgid;
#define SET_GID16(var, gid) do { ; } while (0)
#define NEW_TO_OLD_UID(uid) (uid)
#define NEW_TO_OLD_GID(gid) (gid)
#define OLD_TO_NEW_UID(uid) (uid)
#define OLD_TO_NEW_GID(gid) (gid)
#define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = (uid)
#define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = (gid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment