[PATCH] uml: fix mknod

Fix UML hostfs mknod(): userspace has differernt dev_t size and encoding
than kernel, so extract major/minor and reencode using glibc makedev()
macro.

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Johannes Stezenbach
2007-01-29 13:19:44 -08:00
committed by Linus Torvalds
parent 7a238fcba0
commit 88f6cd0c3b
3 changed files with 4 additions and 4 deletions

View File

@ -755,7 +755,7 @@ int hostfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
goto out_put;
init_special_inode(inode, mode, dev);
err = do_mknod(name, mode, dev);
err = do_mknod(name, mode, MAJOR(dev), MINOR(dev));
if(err)
goto out_free;