]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/fuse/dir.c
vfs: make the string hashes salt the hash
[karo-tx-linux.git] / fs / fuse / dir.c
index b9419058108fabe3cd05d170dc24db8455b6d643..112ab40681152c4cba968a62e5d95052c79b9609 100644 (file)
@@ -953,6 +953,7 @@ int fuse_reverse_inval_entry(struct super_block *sb, u64 parent_nodeid,
        if (!dir)
                goto unlock;
 
+       name->hash = full_name_hash(dir, name->name, name->len);
        entry = d_lookup(dir, name);
        dput(dir);
        if (!entry)
@@ -1202,7 +1203,7 @@ static int fuse_direntplus_link(struct file *file,
 
        fc = get_fuse_conn(dir);
 
-       name.hash = full_name_hash(name.name, name.len);
+       name.hash = full_name_hash(parent, name.name, name.len);
        dentry = d_lookup(parent, &name);
        if (!dentry) {
 retry:
@@ -1719,10 +1720,10 @@ static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
        return fuse_update_attributes(inode, stat, NULL, NULL);
 }
 
-static int fuse_setxattr(struct dentry *entry, const char *name,
-                        const void *value, size_t size, int flags)
+static int fuse_setxattr(struct dentry *unused, struct inode *inode,
+                        const char *name, const void *value,
+                        size_t size, int flags)
 {
-       struct inode *inode = d_inode(entry);
        struct fuse_conn *fc = get_fuse_conn(inode);
        FUSE_ARGS(args);
        struct fuse_setxattr_in inarg;