]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/namei.h
nilfs2: fix buggy behavior seen in enumerating checkpoints
[linux-2.6-omap-h63xx.git] / include / linux / namei.h
index 99eb80306dc5bba4fab74b9a1693222209d619ea..fc2e035798776a5f65a813a4c1cf55778d2d700e 100644 (file)
@@ -94,4 +94,9 @@ static inline char *nd_get_link(struct nameidata *nd)
        return nd->saved_names[nd->depth];
 }
 
+static inline void nd_terminate_link(void *name, size_t len, size_t maxlen)
+{
+       ((char *) name)[min(len, maxlen)] = '\0';
+}
+
 #endif /* _LINUX_NAMEI_H */