debugfs.c (do_write): Mask off the file type bits, and OR in the
	regular file information.  (Addresses Debian Bug: #217456)

diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 2c13e4f..2173c13 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -1117,7 +1117,7 @@
 		com_err(argv[0], 0, "Warning: inode already set");
 	ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0);
 	memset(&inode, 0, sizeof(inode));
-	inode.i_mode = statbuf.st_mode;
+	inode.i_mode = (statbuf.st_mode & ~LINUX_S_IFMT) | LINUX_S_IFREG;
 	inode.i_atime = inode.i_ctime = inode.i_mtime = time(NULL);
 	inode.i_links_count = 1;
 	inode.i_size = statbuf.st_size;