]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: cifs_parse_mount_options: do not tokenize mount options in-place
authorSean Finney <seanius@seanius.net>
Mon, 11 Apr 2011 13:19:32 +0000 (13:19 +0000)
committerSteve French <sfrench@us.ibm.com>
Thu, 19 May 2011 14:10:54 +0000 (14:10 +0000)
commitf80ee982b800ca3eca693111c1ca489fcca8c1de
tree15345fcb639fa2da178ade7fc704117ac0fb0ce4
parent8cb56d5f3170f3b860fe6cb114df504412ec64cc
cifs: cifs_parse_mount_options: do not tokenize mount options in-place

To keep strings passed to cifs_parse_mount_options re-usable (which is
needed to clean up the DFS referral handling), tokenize a copy of the
mount options instead.  If values are needed from this tokenized string,
they too must be duplicated (previously, some options were copied and
others duplicated).

Since we are not on the critical path and any cleanup is relatively easy,
the extra memory usage shouldn't be a problem (and it is a bit simpler
than trying to implement something smarter).

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Sean Finney <seanius@seanius.net>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c