Don't forget to rename mounted snapshots of the file system being renamed.

MFC after:	2 weeks
This commit is contained in:
Pawel Jakub Dawidek 2011-10-24 20:41:31 +00:00
parent d7e9ac7523
commit 649bbd1cd0

View File

@ -2437,7 +2437,7 @@ zfsvfs_update_fromname(const char *oldname, const char *newname)
continue; continue;
} }
if (strncmp(fromname, oldname, oldlen) == 0 && if (strncmp(fromname, oldname, oldlen) == 0 &&
fromname[oldlen] == '/') { (fromname[oldlen] == '/' || fromname[oldlen] == '@')) {
(void)snprintf(tmpbuf, sizeof(tmpbuf), "%s%s", (void)snprintf(tmpbuf, sizeof(tmpbuf), "%s%s",
newname, fromname + oldlen); newname, fromname + oldlen);
(void)strlcpy(fromname, tmpbuf, (void)strlcpy(fromname, tmpbuf,