diff options
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/compat.c b/fs/compat.c index 5976bad85f65..e6d5d70cf3cf 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -267,7 +267,7 @@ asmlinkage long compat_sys_statfs(const char __user *pathname, struct compat_sta | |||
267 | error = user_path(pathname, &path); | 267 | error = user_path(pathname, &path); |
268 | if (!error) { | 268 | if (!error) { |
269 | struct kstatfs tmp; | 269 | struct kstatfs tmp; |
270 | error = vfs_statfs(path.dentry, &tmp); | 270 | error = vfs_statfs(&path, &tmp); |
271 | if (!error) | 271 | if (!error) |
272 | error = put_compat_statfs(buf, &tmp); | 272 | error = put_compat_statfs(buf, &tmp); |
273 | path_put(&path); | 273 | path_put(&path); |
@@ -285,7 +285,7 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user | |||
285 | file = fget(fd); | 285 | file = fget(fd); |
286 | if (!file) | 286 | if (!file) |
287 | goto out; | 287 | goto out; |
288 | error = vfs_statfs(file->f_path.dentry, &tmp); | 288 | error = vfs_statfs(&file->f_path, &tmp); |
289 | if (!error) | 289 | if (!error) |
290 | error = put_compat_statfs(buf, &tmp); | 290 | error = put_compat_statfs(buf, &tmp); |
291 | fput(file); | 291 | fput(file); |
@@ -335,7 +335,7 @@ asmlinkage long compat_sys_statfs64(const char __user *pathname, compat_size_t s | |||
335 | error = user_path(pathname, &path); | 335 | error = user_path(pathname, &path); |
336 | if (!error) { | 336 | if (!error) { |
337 | struct kstatfs tmp; | 337 | struct kstatfs tmp; |
338 | error = vfs_statfs(path.dentry, &tmp); | 338 | error = vfs_statfs(&path, &tmp); |
339 | if (!error) | 339 | if (!error) |
340 | error = put_compat_statfs64(buf, &tmp); | 340 | error = put_compat_statfs64(buf, &tmp); |
341 | path_put(&path); | 341 | path_put(&path); |
@@ -356,7 +356,7 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c | |||
356 | file = fget(fd); | 356 | file = fget(fd); |
357 | if (!file) | 357 | if (!file) |
358 | goto out; | 358 | goto out; |
359 | error = vfs_statfs(file->f_path.dentry, &tmp); | 359 | error = vfs_statfs(&file->f_path, &tmp); |
360 | if (!error) | 360 | if (!error) |
361 | error = put_compat_statfs64(buf, &tmp); | 361 | error = put_compat_statfs64(buf, &tmp); |
362 | fput(file); | 362 | fput(file); |
@@ -379,7 +379,7 @@ asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u) | |||
379 | sb = user_get_super(new_decode_dev(dev)); | 379 | sb = user_get_super(new_decode_dev(dev)); |
380 | if (!sb) | 380 | if (!sb) |
381 | return -EINVAL; | 381 | return -EINVAL; |
382 | err = vfs_statfs(sb->s_root, &sbuf); | 382 | err = statfs_by_dentry(sb->s_root, &sbuf); |
383 | drop_super(sb); | 383 | drop_super(sb); |
384 | if (err) | 384 | if (err) |
385 | return err; | 385 | return err; |
@@ -1193,11 +1193,10 @@ out: | |||
1193 | if (iov != iovstack) | 1193 | if (iov != iovstack) |
1194 | kfree(iov); | 1194 | kfree(iov); |
1195 | if ((ret + (type == READ)) > 0) { | 1195 | if ((ret + (type == READ)) > 0) { |
1196 | struct dentry *dentry = file->f_path.dentry; | ||
1197 | if (type == READ) | 1196 | if (type == READ) |
1198 | fsnotify_access(dentry); | 1197 | fsnotify_access(file); |
1199 | else | 1198 | else |
1200 | fsnotify_modify(dentry); | 1199 | fsnotify_modify(file); |
1201 | } | 1200 | } |
1202 | return ret; | 1201 | return ret; |
1203 | } | 1202 | } |