patch-2.4.19 linux-2.4.19/fs/reiserfs/objectid.c

Next file: linux-2.4.19/fs/reiserfs/prints.c
Previous file: linux-2.4.19/fs/reiserfs/namei.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/fs/reiserfs/objectid.c linux-2.4.19/fs/reiserfs/objectid.c
@@ -5,6 +5,7 @@
 #include <linux/config.h>
 #include <linux/string.h>
 #include <linux/locks.h>
+#include <linux/random.h>
 #include <linux/sched.h>
 #include <linux/reiserfs_fs.h>
 
@@ -196,6 +197,10 @@
     /* set the max size so we don't overflow later */
     disk_sb->s_oid_maxsize = cpu_to_le16(new_size) ;
 
+    /* Zero out label and generate random UUID */
+    memset(disk_sb->s_label, 0, sizeof(disk_sb->s_label)) ;
+    generate_random_uuid(disk_sb->s_uuid);
+
     /* finally, zero out the unused chunk of the new super */
     memset(disk_sb->s_unused, 0, sizeof(disk_sb->s_unused)) ;
     return 0 ;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)