aboutsummaryrefslogtreecommitdiffstats
path: root/fs/libfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-07-14 09:43:25 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-07-14 09:43:25 -0400
commit74931da7a6d341c137f1564a47f36fda68ad21e6 (patch)
tree392892e8b292977d8e15ec49ace7eb58db40b655 /fs/libfs.c
parentec193cf5af0a8dc35c3975ca0aca8e7b7f3e3464 (diff)
make simple_lookup() usable for filesystems that set ->s_d_op
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r--fs/libfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/libfs.c b/fs/libfs.c
index c3a0837fb861..3a3a9b53bf5a 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -61,7 +61,8 @@ struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned
61 61
62 if (dentry->d_name.len > NAME_MAX) 62 if (dentry->d_name.len > NAME_MAX)
63 return ERR_PTR(-ENAMETOOLONG); 63 return ERR_PTR(-ENAMETOOLONG);
64 d_set_d_op(dentry, &simple_dentry_operations); 64 if (!dentry->d_sb->s_d_op)
65 d_set_d_op(dentry, &simple_dentry_operations);
65 d_add(dentry, NULL); 66 d_add(dentry, NULL);
66 return NULL; 67 return NULL;
67} 68}