From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 14 Jul 2005 07:33:43 +0000 (-0700) Subject: [PATCH] uml: hostfs: unuse ROOT_DEV X-Git-Tag: v2.6.13-rc4~106 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a0d43df931870997467042931e8fb7657375d327;p=linux-2.6-omap-h63xx.git [PATCH] uml: hostfs: unuse ROOT_DEV Minimal patch removing uses of ROOT_DEV; next patch unexports it. I've opposed this, but I've planned to reintroduce the functionality without using ROOT_DEV. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Christoph Hellwig Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 4bf43ea87c4..88e68caa378 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -160,8 +159,6 @@ static int read_name(struct inode *ino, char *name) ino->i_size = i_size; ino->i_blksize = i_blksize; ino->i_blocks = i_blocks; - if((ino->i_sb->s_dev == ROOT_DEV) && (ino->i_uid == getuid())) - ino->i_uid = 0; return(0); } @@ -841,16 +838,10 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr) attrs.ia_mode = attr->ia_mode; } if(attr->ia_valid & ATTR_UID){ - if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && - (attr->ia_uid == 0)) - attr->ia_uid = getuid(); attrs.ia_valid |= HOSTFS_ATTR_UID; attrs.ia_uid = attr->ia_uid; } if(attr->ia_valid & ATTR_GID){ - if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && - (attr->ia_gid == 0)) - attr->ia_gid = getgid(); attrs.ia_valid |= HOSTFS_ATTR_GID; attrs.ia_gid = attr->ia_gid; }