From: Nikitas Angelinas Date: Tue, 18 Oct 2011 14:49:51 +0000 (-0400) Subject: ext4: MMP: kmmpd should use nodename from init_uts_ns.name, not sysname X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=215fc6af739d2dfdcad5496248d0d6302eb8a604;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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: Andreas Dilger Signed-off-by: Nikitas Angelinas Signed-off-by: Andrew Perepechko Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 9bdef3f537c5..2fca64efd6db 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -109,7 +109,7 @@ static int kmmpd(void *data) mmp->mmp_check_interval = cpu_to_le16(mmp_check_interval); 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)); while (!kthread_should_stop()) {