wok diff linux/stuff/linux-hardlinks.u @ rev 19615

Up: mpfr (3.1.5)
author Alexander Medvedev <devl547@gmail.com>
date Mon Jan 09 19:50:23 2017 +0000 (2017-01-09)
parents 90f3c26ffd86
children
line diff
     1.1 --- a/linux/stuff/linux-hardlinks.u	Tue Dec 02 19:00:19 2014 +0100
     1.2 +++ b/linux/stuff/linux-hardlinks.u	Mon Jan 09 19:50:23 2017 +0000
     1.3 @@ -197,7 +197,7 @@
     1.4   		kfree(vcollected);
     1.5   		eat(body_len);
     1.6   		state = SkipIt;
     1.7 -@@ -353,13 +385,15 @@
     1.8 +@@ -353,13 +385,18 @@
     1.9   
    1.10   static int __init do_symlink(void)
    1.11   {
    1.12 @@ -206,9 +206,12 @@
    1.13  -	sys_symlink(collected + N_ALIGN(name_len), collected);
    1.14  -	sys_lchown(collected, uid, gid);
    1.15  -	do_utime(collected, mtime);
    1.16 ++	char c = victim[body_len];
    1.17 ++
    1.18  +	victim[body_len] = '\0';
    1.19  +	clean_path(vcollected, 0);
    1.20  +	sys_symlink(victim, vcollected);
    1.21 ++	victim[body_len] = c;
    1.22  +	sys_lchown(vcollected, uid, gid);
    1.23  +	do_utime(vcollected, mtime);
    1.24  +	make_links(vcollected);
    1.25 @@ -219,7 +222,7 @@
    1.26   	return 0;
    1.27   }
    1.28   
    1.29 -@@ -466,10 +500,9 @@
    1.30 +@@ -466,10 +503,9 @@
    1.31   	int early_free_initrd = (buf == (char *) initrd_start);
    1.32   
    1.33   	header_buf = kmalloc(110, GFP_KERNEL);
    1.34 @@ -231,7 +234,7 @@
    1.35   		panic("can't allocate buffers");
    1.36   
    1.37   	state = Start;
    1.38 -@@ -524,7 +557,6 @@
    1.39 +@@ -524,7 +560,6 @@
    1.40   	}
    1.41   	dir_utime();
    1.42   	kfree(name_buf);