aboutsummaryrefslogtreecommitdiffstats
path: root/fs/kernfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/kernfs/dir.c')
-rw-r--r--fs/kernfs/dir.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 09242aaa8829..6e7fd37615f8 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -180,29 +180,6 @@ int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)
180} 180}
181 181
182/** 182/**
183 * kernfs_path_len - determine the length of the full path of a given node
184 * @kn: kernfs_node of interest
185 *
186 * The returned length doesn't include the space for the terminating '\0'.
187 */
188size_t kernfs_path_len(struct kernfs_node *kn)
189{
190 size_t len = 0;
191 unsigned long flags;
192
193 spin_lock_irqsave(&kernfs_rename_lock, flags);
194
195 do {
196 len += strlen(kn->name) + 1;
197 kn = kn->parent;
198 } while (kn && kn->parent);
199
200 spin_unlock_irqrestore(&kernfs_rename_lock, flags);
201
202 return len;
203}
204
205/**
206 * kernfs_path_from_node - build path of node @to relative to @from. 183 * kernfs_path_from_node - build path of node @to relative to @from.
207 * @from: parent kernfs_node relative to which we need to build the path 184 * @from: parent kernfs_node relative to which we need to build the path
208 * @to: kernfs_node of interest 185 * @to: kernfs_node of interest