/// template for mergesort outplace and using array//
void merge(array A,p,q) {
allocate a new temp array of size n;
merge the two segments of A using temp array;
repace A with temp;
}
void mergesort(array A,start,end) {
divide in mid;
mergesort(A,start,mid);
mergesort(A,mid+1,end);
merge();
}
int main() {
input array A[n];
mergesort(A,0,n);//
}
In case of array :
except the original input array mergesort() procedure takes an extra O(n) space as a temporary storage and dominates over O(logn). So if we talk about extra space(excluding original array[n] in main function) YES, mergesort() takes linear stack space.
in case of linked list:
apart from the original linkedlist mergesort() does not allocate any new linkedlist or temporary space. So extra stack space is $O(logn)$
I was just making an analogy of B() to merge() procedure (not mergesort()) assuming no extra space allocation.