diff options
author | Andrew Gabbasov <andrew_gabbasov@mentor.com> | 2016-01-15 02:44:19 -0600 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2016-02-09 13:05:23 +0100 |
commit | 525e2c56c341cb8b31bbe1694f0582077f454969 (patch) | |
tree | bc3abd9e1f07f0e4322d290fac0fcac90a38d63e /fs/udf/namei.c | |
parent | 7955118eafc4a2621fd88e92b505919af344583f (diff) |
udf: Parameterize output length in udf_put_filename
Make the desired output length a parameter rather than have it
hard-coded to UDF_NAME_LEN. Although all call sites still have
this length the same, this parameterization will make the function
more universal and also consistent with udf_get_filename.
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/namei.c')
-rw-r--r-- | fs/udf/namei.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 42eafb91f7ff..f82c70d73aba 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -362,8 +362,9 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir, *err = -EINVAL; goto out_err; } - namelen = udf_put_filename(sb, dentry->d_name.name, name, - dentry->d_name.len); + namelen = udf_put_filename(sb, dentry->d_name.name, + dentry->d_name.len, + name, UDF_NAME_LEN); if (!namelen) { *err = -ENAMETOOLONG; goto out_err; @@ -997,8 +998,9 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry, } if (pc->componentType == 5) { - namelen = udf_put_filename(sb, compstart, name, - symname - compstart); + namelen = udf_put_filename(sb, compstart, + symname - compstart, + name, UDF_NAME_LEN); if (!namelen) goto out_no_entry; |