]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/libfs.c
much milder d_walk() race
[mirror_ubuntu-bionic-kernel.git] / fs / libfs.c
index 8765ff1adc07dcc63252615927dff818628649cd..cedeacbae303a9483fea836ba4a5cc24cb022f41 100644 (file)
@@ -71,9 +71,7 @@ EXPORT_SYMBOL(simple_lookup);
 
 int dcache_dir_open(struct inode *inode, struct file *file)
 {
-       static struct qstr cursor_name = QSTR_INIT(".", 1);
-
-       file->private_data = d_alloc(file->f_path.dentry, &cursor_name);
+       file->private_data = d_alloc_cursor(file->f_path.dentry);
 
        return file->private_data ? 0 : -ENOMEM;
 }
@@ -1118,8 +1116,9 @@ static int empty_dir_setattr(struct dentry *dentry, struct iattr *attr)
        return -EPERM;
 }
 
-static int empty_dir_setxattr(struct dentry *dentry, const char *name,
-                             const void *value, size_t size, int flags)
+static int empty_dir_setxattr(struct dentry *dentry, struct inode *inode,
+                             const char *name, const void *value,
+                             size_t size, int flags)
 {
        return -EOPNOTSUPP;
 }