diff options
Diffstat (limited to 'fs/cachefiles/daemon.c')
-rw-r--r-- | fs/cachefiles/daemon.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index c2413561ea75..24eb0d37241a 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c | |||
@@ -683,6 +683,10 @@ int cachefiles_has_space(struct cachefiles_cache *cache, | |||
683 | unsigned fnr, unsigned bnr) | 683 | unsigned fnr, unsigned bnr) |
684 | { | 684 | { |
685 | struct kstatfs stats; | 685 | struct kstatfs stats; |
686 | struct path path = { | ||
687 | .mnt = cache->mnt, | ||
688 | .dentry = cache->mnt->mnt_root, | ||
689 | }; | ||
686 | int ret; | 690 | int ret; |
687 | 691 | ||
688 | //_enter("{%llu,%llu,%llu,%llu,%llu,%llu},%u,%u", | 692 | //_enter("{%llu,%llu,%llu,%llu,%llu,%llu},%u,%u", |
@@ -697,7 +701,7 @@ int cachefiles_has_space(struct cachefiles_cache *cache, | |||
697 | /* find out how many pages of blockdev are available */ | 701 | /* find out how many pages of blockdev are available */ |
698 | memset(&stats, 0, sizeof(stats)); | 702 | memset(&stats, 0, sizeof(stats)); |
699 | 703 | ||
700 | ret = vfs_statfs(cache->mnt->mnt_root, &stats); | 704 | ret = vfs_statfs(&path, &stats); |
701 | if (ret < 0) { | 705 | if (ret < 0) { |
702 | if (ret == -EIO) | 706 | if (ret == -EIO) |
703 | cachefiles_io_error(cache, "statfs failed"); | 707 | cachefiles_io_error(cache, "statfs failed"); |