aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/hostfs/hostfs_kern.c9
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 }