]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[GFS2] re-support special inode
authorDenis Cheng <crquan@gmail.com>
Tue, 26 Feb 2008 07:25:04 +0000 (15:25 +0800)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 31 Mar 2008 09:41:22 +0000 (10:41 +0100)
a previous commit removed call to
init_special_inode from inode lookuping, this cause problems as:

 # mknod /mnt/gfs2/dev/null c 1 3
 # cat /mnt/gfs2/dev/null
 cat: /mnt/gfs2/dev/null: Invalid argument

without special inode, GFS2 cannot support char device file,
block device file, fifo pipe, and socket file, lose many important
features as a common file system.

this one line patch re add special inode support.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/inode.c

index 7b9f31e5d6d38d6f2d5d15c76eedbab76254f144..92ea9afacb17e9d50cc24b3010cf9579f51b56d6 100644 (file)
@@ -150,6 +150,7 @@ void gfs2_set_iop(struct inode *inode)
                inode->i_op = &gfs2_symlink_iops;
        } else {
                inode->i_op = &gfs2_file_iops;
+               init_special_inode(inode, inode->i_mode, inode->i_rdev);
        }
 
        unlock_new_inode(inode);