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)
commitb946845a9dc523c759cae2b6a0f6827486c3221a
tree15345fcb639fa2da178ade7fc704117ac0fb0ce4
parentc1508ca23653245266e2e3ab69a8dad464f7a569
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