diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-06 20:08:56 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:48:10 -0400 |
commit | 39b743c6199a317ffac67fcae1dd05be3142633a (patch) | |
tree | 98e1ba53623f9844f192ab94df47717b4e00ed3b /fs/hostfs/hostfs_kern.c | |
parent | 5e2df28cc62fdc3f4900de23f4ec69e6312f78a4 (diff) |
switch stat_file() to passing a single struct rather than fsckloads of pointers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 5a77ed3dfd7e..420a826ae0f2 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -131,28 +131,21 @@ static char *inode_name(struct inode *ino, int extra) | |||
131 | 131 | ||
132 | static int read_name(struct inode *ino, char *name) | 132 | static int read_name(struct inode *ino, char *name) |
133 | { | 133 | { |
134 | /* | 134 | struct hostfs_stat st; |
135 | * The non-int inode fields are copied into ints by stat_file and | 135 | int err = stat_file(name, &st, -1); |
136 | * then copied into the inode because passing the actual pointers | ||
137 | * in and having them treated as int * breaks on big-endian machines | ||
138 | */ | ||
139 | int err; | ||
140 | int i_mode, i_nlink, i_blksize; | ||
141 | unsigned long long i_size; | ||
142 | unsigned long long i_ino; | ||
143 | unsigned long long i_blocks; | ||
144 | |||
145 | err = stat_file(name, &i_ino, &i_mode, &i_nlink, &ino->i_uid, | ||
146 | &ino->i_gid, &i_size, &ino->i_atime, &ino->i_mtime, | ||
147 | &ino->i_ctime, &i_blksize, &i_blocks, -1); | ||
148 | if (err) | 136 | if (err) |
149 | return err; | 137 | return err; |
150 | 138 | ||
151 | ino->i_ino = i_ino; | 139 | ino->i_ino = st.ino; |
152 | ino->i_mode = i_mode; | 140 | ino->i_mode = st.mode; |
153 | ino->i_nlink = i_nlink; | 141 | ino->i_nlink = st.nlink; |
154 | ino->i_size = i_size; | 142 | ino->i_uid = st.uid; |
155 | ino->i_blocks = i_blocks; | 143 | ino->i_gid = st.gid; |
144 | ino->i_atime = st.atime; | ||
145 | ino->i_mtime = st.mtime; | ||
146 | ino->i_ctime = st.ctime; | ||
147 | ino->i_size = st.size; | ||
148 | ino->i_blocks = st.blocks; | ||
156 | return 0; | 149 | return 0; |
157 | } | 150 | } |
158 | 151 | ||