[patch 1/1] reiser4: Fixups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




. Fix up incorrect calculation of REISER4_SUPER_MAGIC_STRING size;
. Fix up incorrect initialization of dataonstack, dotdot_entry,
  dotdot_name variables in reiser4_rename_common().

Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx>
---
 fs/reiser4/plugin/inode_ops_rename.c |    6 +++---
 fs/reiser4/reiser4.h                 |    2 +-
 fs/reiser4/vfs_ops.c                 |    1 -
 3 files changed, 4 insertions(+), 5 deletions(-)

--- a/fs/reiser4/plugin/inode_ops_rename.c
+++ b/fs/reiser4/plugin/inode_ops_rename.c
@@ -572,10 +572,10 @@ int reiser4_rename_common(struct inode *
 			   dotdot entry. */
 			coord_t *dotdot_coord;
 
-			memset(dataonstack, 0, sizeof dataonstack);
-			memset(dotdot_entry, 0, sizeof dotdot_entry);
+			memset(dataonstack, 0, sizeof(*dataonstack));
+			memset(dotdot_entry, 0, sizeof(*dotdot_entry));
 			dotdot_entry->obj = old_dir;
-			memset(dotdot_name, 0, sizeof dotdot_name);
+			memset(dotdot_name, 0, sizeof(*dotdot_name));
 			dotdot_name->d_name.name = "..";
 			dotdot_name->d_name.len = 2;
 			/*
--- a/fs/reiser4/reiser4.h
+++ b/fs/reiser4/reiser4.h
@@ -54,7 +54,7 @@
  * option
  */
 
-extern const char *REISER4_SUPER_MAGIC_STRING;
+#define REISER4_SUPER_MAGIC_STRING "ReIsEr4"
 extern const int REISER4_MAGIC_OFFSET;	/* offset to magic string from the
 					 * beginning of device */
 
--- a/fs/reiser4/vfs_ops.c
+++ b/fs/reiser4/vfs_ops.c
@@ -213,7 +213,6 @@ void reiser4_throttle_write(struct inode
 	current->journal_info = ctx;
 }
 
-const char *REISER4_SUPER_MAGIC_STRING = "ReIsEr4";
 const int REISER4_MAGIC_OFFSET = 16 * 4096;	/* offset to magic string from the
 						 * beginning of device */
 

[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux