diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-07-14 03:33:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-14 12:00:25 -0400 |
commit | a0d43df931870997467042931e8fb7657375d327 (patch) | |
tree | 1ef8099b25195a7612f0ba187b3c622f0cca9264 /fs/hostfs/hostfs_kern.c | |
parent | 20d0021394c1b070bf04b22c5bc8fdb437edd4c5 (diff) |
[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 <blaisorblade@yahoo.it>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 4bf43ea87c46..88e68caa3784 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/blkdev.h> | 16 | #include <linux/blkdev.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/root_dev.h> | ||
19 | #include <linux/statfs.h> | 18 | #include <linux/statfs.h> |
20 | #include <linux/kdev_t.h> | 19 | #include <linux/kdev_t.h> |
21 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
@@ -160,8 +159,6 @@ static int read_name(struct inode *ino, char *name) | |||
160 | ino->i_size = i_size; | 159 | ino->i_size = i_size; |
161 | ino->i_blksize = i_blksize; | 160 | ino->i_blksize = i_blksize; |
162 | ino->i_blocks = i_blocks; | 161 | ino->i_blocks = i_blocks; |
163 | if((ino->i_sb->s_dev == ROOT_DEV) && (ino->i_uid == getuid())) | ||
164 | ino->i_uid = 0; | ||
165 | return(0); | 162 | return(0); |
166 | } | 163 | } |
167 | 164 | ||
@@ -841,16 +838,10 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
841 | attrs.ia_mode = attr->ia_mode; | 838 | attrs.ia_mode = attr->ia_mode; |
842 | } | 839 | } |
843 | if(attr->ia_valid & ATTR_UID){ | 840 | if(attr->ia_valid & ATTR_UID){ |
844 | if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && | ||
845 | (attr->ia_uid == 0)) | ||
846 | attr->ia_uid = getuid(); | ||
847 | attrs.ia_valid |= HOSTFS_ATTR_UID; | 841 | attrs.ia_valid |= HOSTFS_ATTR_UID; |
848 | attrs.ia_uid = attr->ia_uid; | 842 | attrs.ia_uid = attr->ia_uid; |
849 | } | 843 | } |
850 | if(attr->ia_valid & ATTR_GID){ | 844 | if(attr->ia_valid & ATTR_GID){ |
851 | if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && | ||
852 | (attr->ia_gid == 0)) | ||
853 | attr->ia_gid = getgid(); | ||
854 | attrs.ia_valid |= HOSTFS_ATTR_GID; | 845 | attrs.ia_valid |= HOSTFS_ATTR_GID; |
855 | attrs.ia_gid = attr->ia_gid; | 846 | attrs.ia_gid = attr->ia_gid; |
856 | } | 847 | } |