Merge remote-tracking branch 'ovl/rename2' into for-linus
[cascardo/linux.git] / fs / fuse / dir.c
index cca7b04..215b4be 100644 (file)
@@ -146,7 +146,7 @@ static void fuse_invalidate_entry(struct dentry *entry)
 }
 
 static void fuse_lookup_init(struct fuse_conn *fc, struct fuse_args *args,
-                            u64 nodeid, struct qstr *name,
+                            u64 nodeid, const struct qstr *name,
                             struct fuse_entry_out *outarg)
 {
        memset(outarg, 0, sizeof(struct fuse_entry_out));
@@ -282,7 +282,7 @@ int fuse_valid_type(int m)
                S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m);
 }
 
-int fuse_lookup_name(struct super_block *sb, u64 nodeid, struct qstr *name,
+int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name,
                     struct fuse_entry_out *outarg, struct inode **inode)
 {
        struct fuse_conn *fc = get_fuse_conn_super(sb);
@@ -637,7 +637,7 @@ static int fuse_symlink(struct inode *dir, struct dentry *entry,
 static inline void fuse_update_ctime(struct inode *inode)
 {
        if (!IS_NOCMTIME(inode)) {
-               inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_ctime = current_time(inode);
                mark_inode_dirty_sync(inode);
        }
 }
@@ -955,6 +955,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)
@@ -1204,7 +1205,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:
@@ -1875,7 +1876,7 @@ static const struct inode_operations fuse_dir_inode_operations = {
        .symlink        = fuse_symlink,
        .unlink         = fuse_unlink,
        .rmdir          = fuse_rmdir,
-       .rename2        = fuse_rename2,
+       .rename         = fuse_rename2,
        .link           = fuse_link,
        .setattr        = fuse_setattr,
        .create         = fuse_create,