Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 215fc6af authored by Nikitas Angelinas's avatar Nikitas Angelinas Committed by Theodore Ts'o
Browse files

ext4: MMP: kmmpd should use nodename from init_uts_ns.name, not sysname



sysname holds "Linux" by default, i.e. what appears when doing a "uname
-s"; nodename should be used to print the machine's hostname, i.e. what
is returned when doing a "uname -n" or "hostname", and what
gethostname(2)/sethostname(2) manipulate, in order to notify the
administrator of the node which is contending to mount the filesystem.

Acked-by: default avatarAndreas Dilger <adilger@dilger.ca>
Signed-off-by: default avatarNikitas Angelinas <nikitas_angelinas@xyratex.com>
Signed-off-by: default avatarAndrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent f472e026
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -109,7 +109,7 @@ static int kmmpd(void *data)
	mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval);
	mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval);
	bdevname(bh->b_bdev, mmp->mmp_bdevname);
	bdevname(bh->b_bdev, mmp->mmp_bdevname);


	memcpy(mmp->mmp_nodename, init_utsname()->sysname,
	memcpy(mmp->mmp_nodename, init_utsname()->nodename,
	       sizeof(mmp->mmp_nodename));
	       sizeof(mmp->mmp_nodename));


	while (!kthread_should_stop()) {
	while (!kthread_should_stop()) {