Skip to content

Commit

Permalink
ext4: MMP: kmmpd should use nodename from init_uts_ns.name, not sysname
Browse files Browse the repository at this point in the history
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 <adilger@dilger.ca>
Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Nikitas Angelinas authored and Theodore Ts'o committed Oct 18, 2011
1 parent f472e02 commit 215fc6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/mmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 215fc6a

Please sign in to comment.