Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bad60fdd authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Lachlan McIlroy
Browse files

[XFS] Fix mknod regression



This was broken by my '[XFS] simplify xfs_create/mknod/symlink prototype',
which assigned the re-shuffled ondisk dev_t back to the rdev variable in
xfs_vn_mknod. Because of that i_rdev is set to the ondisk dev_t instead of
the linux dev_t later down the function.

Fortunately the fix for it is trivial: we can just remove the assignment
because xfs_revalidate_inode has done the proper job before unlocking the
inode.

SGI-PV: 974873
SGI-Modid: xfs-linux-melb:xfs-kern:30273a

Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
parent 041388b5
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -332,9 +332,7 @@ xfs_vn_mknod(
		ASSERT(vp);
		ASSERT(vp);
		ip = vn_to_inode(vp);
		ip = vn_to_inode(vp);


		if (S_ISCHR(mode) || S_ISBLK(mode))
		if (S_ISDIR(mode))
			ip->i_rdev = rdev;
		else if (S_ISDIR(mode))
			xfs_validate_fields(ip);
			xfs_validate_fields(ip);
		d_instantiate(dentry, ip);
		d_instantiate(dentry, ip);
		xfs_validate_fields(dir);
		xfs_validate_fields(dir);