aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-07-07 12:53:11 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:48:42 -0400
commitebabe9a9001af0af56c0c2780ca1576246e7a74b (patch)
treeb263299f575c650b6e9d95c7c4bdeef958af2fc9 /arch/parisc
parent336fb3b97b78edc65bae0b223b83bf676cfe29e2 (diff)
pass a struct path to vfs_statfs
We'll need the path to implement the flags field for statvfs support. We do have it available in all callers except: - ecryptfs_statfs. This one doesn't actually need vfs_statfs but just needs to do a caller to the lower filesystem statfs method. - sys_ustat. Add a non-exported statfs_by_dentry helper for it which doesn't won't be able to fill out the flags field later on. In addition rename the helpers for statfs vs fstatfs to do_*statfs instead of the misleading vfs prefix. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/hpux/sys_hpux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c
index 92343bd35fa3..ba430a03bc7a 100644
--- a/arch/parisc/hpux/sys_hpux.c
+++ b/arch/parisc/hpux/sys_hpux.c
@@ -145,7 +145,7 @@ static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf)
145 s = user_get_super(dev); 145 s = user_get_super(dev);
146 if (s == NULL) 146 if (s == NULL)
147 goto out; 147 goto out;
148 err = vfs_statfs(s->s_root, &sbuf); 148 err = statfs_by_dentry(s->s_root, &sbuf);
149 drop_super(s); 149 drop_super(s);
150 if (err) 150 if (err)
151 goto out; 151 goto out;
@@ -186,12 +186,12 @@ struct hpux_statfs {
186 int16_t f_pad; 186 int16_t f_pad;
187}; 187};
188 188
189static int vfs_statfs_hpux(struct dentry *dentry, struct hpux_statfs *buf) 189static int do_statfs_hpux(struct path *path, struct hpux_statfs *buf)
190{ 190{
191 struct kstatfs st; 191 struct kstatfs st;
192 int retval; 192 int retval;
193 193
194 retval = vfs_statfs(dentry, &st); 194 retval = vfs_statfs(path, &st);
195 if (retval) 195 if (retval)
196 return retval; 196 return retval;
197 197
@@ -219,7 +219,7 @@ asmlinkage long hpux_statfs(const char __user *pathname,
219 error = user_path(pathname, &path); 219 error = user_path(pathname, &path);
220 if (!error) { 220 if (!error) {
221 struct hpux_statfs tmp; 221 struct hpux_statfs tmp;
222 error = vfs_statfs_hpux(path.dentry, &tmp); 222 error = do_statfs_hpux(&path, &tmp);
223 if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) 223 if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
224 error = -EFAULT; 224 error = -EFAULT;
225 path_put(&path); 225 path_put(&path);
@@ -237,7 +237,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf)
237 file = fget(fd); 237 file = fget(fd);
238 if (!file) 238 if (!file)
239 goto out; 239 goto out;
240 error = vfs_statfs_hpux(file->f_path.dentry, &tmp); 240 error = do_statfs_hpux(&file->f_path, &tmp);
241 if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) 241 if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
242 error = -EFAULT; 242 error = -EFAULT;
243 fput(file); 243 fput(file);