Skip to contentSkip to conversation

correctly set inode->i_rdev

PATCH In review Rusty Lynch 2 participants 2 messages Mar 26, 2004 – Mar 29, 2004 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 correctly set inode->i_rdev

The following minimal patch fixes bug #52. For some reason we were always setting the inode->i_rdev to the super block's dev while populating the inode.

    --rusty
inode.c +1 -1
Index: src/inode.c
===================================================================
@@ -260,7 +260,7 @@
 		goto bail;
 	}
 	
-	OCFS_SET_INODE_DEV(sb, inode);
+	inode->i_rdev = MKDEV (fe->dev_major, fe->dev_minor);
 	inode->i_mode = mode;
 	inode->i_uid = fe->uid;
 	inode->i_gid = fe->gid;
#1 lore raw
Quoted 3 lines · Rusty Lynch

The following minimal patch fixes bug #52. For some reason we were always setting the inode->i_rdev to the super block's dev while populating the inode.

Ok, I like this approach better than my original one.
It also means that OCFS_SET_INODE_DEV isn't used anymore so I'll take that out too.

	--Mark

--
Mark Fasheh
Software Developer, Oracle Corp
[email protected]