]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/9p/cache.c
fs/9p: When doing inode lookup compare qid details and inode mode bits.
[mv-sheeva.git] / fs / 9p / cache.c
index 5b335c5086a1011d7b9e301ac1b52c9d4d3ba7ea..945aa5f02f9beb9786d8033b3d79d141071cdca0 100644 (file)
@@ -108,11 +108,10 @@ static uint16_t v9fs_cache_inode_get_key(const void *cookie_netfs_data,
                                         void *buffer, uint16_t bufmax)
 {
        const struct v9fs_inode *v9inode = cookie_netfs_data;
-       memcpy(buffer, &v9inode->fscache_key->path,
-              sizeof(v9inode->fscache_key->path));
+       memcpy(buffer, &v9inode->qid.path, sizeof(v9inode->qid.path));
        P9_DPRINTK(P9_DEBUG_FSC, "inode %p get key %llu", &v9inode->vfs_inode,
-                  v9inode->fscache_key->path);
-       return sizeof(v9inode->fscache_key->path);
+                  v9inode->qid.path);
+       return sizeof(v9inode->qid.path);
 }
 
 static void v9fs_cache_inode_get_attr(const void *cookie_netfs_data,
@@ -129,11 +128,10 @@ static uint16_t v9fs_cache_inode_get_aux(const void *cookie_netfs_data,
                                         void *buffer, uint16_t buflen)
 {
        const struct v9fs_inode *v9inode = cookie_netfs_data;
-       memcpy(buffer, &v9inode->fscache_key->version,
-              sizeof(v9inode->fscache_key->version));
+       memcpy(buffer, &v9inode->qid.version, sizeof(v9inode->qid.version));
        P9_DPRINTK(P9_DEBUG_FSC, "inode %p get aux %u", &v9inode->vfs_inode,
-                  v9inode->fscache_key->version);
-       return sizeof(v9inode->fscache_key->version);
+                  v9inode->qid.version);
+       return sizeof(v9inode->qid.version);
 }
 
 static enum
@@ -143,11 +141,11 @@ fscache_checkaux v9fs_cache_inode_check_aux(void *cookie_netfs_data,
 {
        const struct v9fs_inode *v9inode = cookie_netfs_data;
 
-       if (buflen != sizeof(v9inode->fscache_key->version))
+       if (buflen != sizeof(v9inode->qid.version))
                return FSCACHE_CHECKAUX_OBSOLETE;
 
-       if (memcmp(buffer, &v9inode->fscache_key->version,
-                  sizeof(v9inode->fscache_key->version)))
+       if (memcmp(buffer, &v9inode->qid.version,
+                  sizeof(v9inode->qid.version)))
                return FSCACHE_CHECKAUX_OBSOLETE;
 
        return FSCACHE_CHECKAUX_OKAY;