linux/fs/kernfs
Serge Hallyn e99ed4de17 kernfs_path_from_node_locked: don't overwrite nlen
We've calculated @len to be the bytes we need for '/..' entries from
@kn_from to the common ancestor, and calculated @nlen to be the extra
bytes we need to get from the common ancestor to @kn_to.  We use them
as such at the end.  But in the loop copying the actual entries, we
overwrite @nlen.  Use a temporary variable for that instead.

Without this, the return length, when the buffer is large enough, is
wrong.  (When the buffer is NULL or too small, the returned value is
correct. The buffer contents are also correct.)

Interestingly, no callers of this function are affected by this as of
yet.  However the upcoming cgroup_show_path() will be.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2016-05-02 12:36:00 -04:00
..
dir.c kernfs_path_from_node_locked: don't overwrite nlen 2016-05-02 12:36:00 -04:00
file.c kernfs: remove outdated and confusing comment 2015-05-24 12:28:29 -07:00
inode.c tmpfs: listxattr should include POSIX ACL xattrs 2015-12-06 21:34:15 -05:00
Kconfig kernfs: add CONFIG_KERNFS 2014-02-07 16:08:57 -08:00
kernfs-internal.h kernfs: make kernfs_get_inode() public 2015-06-18 16:54:28 -04:00
Makefile
mount.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
symlink.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00