]> Git Repo - linux.git/commitdiff
make simple_lookup() usable for filesystems that set ->s_d_op
authorAl Viro <[email protected]>
Sun, 14 Jul 2013 13:43:25 +0000 (17:43 +0400)
committerAl Viro <[email protected]>
Sun, 14 Jul 2013 13:43:25 +0000 (17:43 +0400)
Signed-off-by: Al Viro <[email protected]>
fs/libfs.c

index c3a0837fb861d8d403e6b3b7fadd4056aa42df79..3a3a9b53bf5a974d3c206f31ae402aaf752dd39c 100644 (file)
@@ -61,7 +61,8 @@ struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned
 
        if (dentry->d_name.len > NAME_MAX)
                return ERR_PTR(-ENAMETOOLONG);
-       d_set_d_op(dentry, &simple_dentry_operations);
+       if (!dentry->d_sb->s_d_op)
+               d_set_d_op(dentry, &simple_dentry_operations);
        d_add(dentry, NULL);
        return NULL;
 }
This page took 0.058412 seconds and 4 git commands to generate.