aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/misc.h')
-rw-r--r--fs/ubifs/misc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index 87dabf9fe742..87ced4c74a61 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -325,4 +325,21 @@ static inline struct timespec ubifs_current_time(struct inode *inode)
325 current_fs_time(inode->i_sb) : CURRENT_TIME_SEC; 325 current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
326} 326}
327 327
328/**
329 * ubifs_tnc_lookup - look up a file-system node.
330 * @c: UBIFS file-system description object
331 * @key: node key to lookup
332 * @node: the node is returned here
333 *
334 * This function look up and reads node with key @key. The caller has to make
335 * sure the @node buffer is large enough to fit the node. Returns zero in case
336 * of success, %-ENOENT if the node was not found, and a negative error code in
337 * case of failure.
338 */
339static inline int ubifs_tnc_lookup(struct ubifs_info *c,
340 const union ubifs_key *key, void *node)
341{
342 return ubifs_tnc_locate(c, key, node, NULL, NULL);
343}
344
328#endif /* __UBIFS_MISC_H__ */ 345#endif /* __UBIFS_MISC_H__ */