]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/cachefiles/daemon.c
pass a struct path to vfs_statfs
[net-next-2.6.git] / fs / cachefiles / daemon.c
index c2413561ea753f4ede277ec6736c49db738456f5..24eb0d37241a1f5e6dec78732eb7c7296f14a738 100644 (file)
@@ -683,6 +683,10 @@ int cachefiles_has_space(struct cachefiles_cache *cache,
                         unsigned fnr, unsigned bnr)
 {
        struct kstatfs stats;
+       struct path path = {
+               .mnt    = cache->mnt,
+               .dentry = cache->mnt->mnt_root,
+       };
        int ret;
 
        //_enter("{%llu,%llu,%llu,%llu,%llu,%llu},%u,%u",
@@ -697,7 +701,7 @@ int cachefiles_has_space(struct cachefiles_cache *cache,
        /* find out how many pages of blockdev are available */
        memset(&stats, 0, sizeof(stats));
 
-       ret = vfs_statfs(cache->mnt->mnt_root, &stats);
+       ret = vfs_statfs(&path, &stats);
        if (ret < 0) {
                if (ret == -EIO)
                        cachefiles_io_error(cache, "statfs failed");