]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Remove struct ustr as non-needed intermediate storage
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>
Fri, 15 Jan 2016 08:44:22 +0000 (02:44 -0600)
committerJan Kara <jack@suse.cz>
Tue, 9 Feb 2016 12:05:23 +0000 (13:05 +0100)
commit3b9c75c80a10efc44a8c5c55fba0bf17d76d8d81
treeef5e96d406e9ac257911571591e0bcfb58afd9ad
parentf707c2721a7e5a07badb0f3b04d512c4042793a0
udf: Remove struct ustr as non-needed intermediate storage

Although 'struct ustr' tries to structurize the data by combining
the string and its length, it doesn't actually make much benefit,
since it saves only one parameter, but introduces an extra copying
of the whole buffer, serving as an intermediate storage. It looks
quite inefficient and not actually needed.

This commit gets rid of the struct ustr by changing the parameters
of some functions appropriately.

Also, it removes using 'dstring' type, since it doesn't make much
sense too.

Just using the occasion, add a 'const' qualifier to udf_get_filename
to make consistent parameters sets.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/super.c
fs/udf/udfdecl.h
fs/udf/unicode.c