infra: fix forgotten {get,set}_df()

This commit is contained in:
Thomas Schoebel-Theuer 2013-04-08 11:20:56 +02:00
parent 1c8fa83d1f
commit a6aaa93da7
1 changed files with 8 additions and 1 deletions

View File

@ -285,13 +285,20 @@ void mars_remaining_space(const char *fspath, loff_t *total, loff_t *remaining)
{
struct path path = {};
struct kstatfs kstatfs = {};
mm_segment_t oldfs;
int res;
*total = *remaining = 0;
oldfs = get_fs();
set_fs(get_ds());
res = user_path_at(AT_FDCWD, fspath, 0, &path);
set_fs(oldfs);
if (unlikely(res < 0)) {
MARS_ERR("cannot get fspath '%s'\n", fspath);
MARS_ERR("cannot get fspath '%s', err = %d\n\n", fspath, res);
goto err;
}
if (unlikely(!path.dentry)) {