[Ocfs2-commits] zab commits r2119 - trunk/fs/ocfs2/cluster

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Apr 6 17:10:28 CDT 2005


Author: zab
Signed-off-by: mfasheh
Date: 2005-04-06 17:10:26 -0500 (Wed, 06 Apr 2005)
New Revision: 2119

Modified:
   trunk/fs/ocfs2/cluster/heartbeat.c
Log:
o check that we're really working with a block device inode before using I_BDEV

Signed-off-by: mfasheh


Modified: trunk/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/cluster/heartbeat.c	2005-04-06 18:41:15 UTC (rev 2118)
+++ trunk/fs/ocfs2/cluster/heartbeat.c	2005-04-06 22:10:26 UTC (rev 2119)
@@ -844,8 +844,11 @@
 	inode = igrab(filp->f_mapping->host);
 	if (inode == NULL)
 		goto out;
+
+	if (!S_ISBLK(inode->i_mode))
+		goto out;
+
 	reg->hr_bdev = I_BDEV(filp->f_mapping->host);
-
 	ret = blkdev_get(reg->hr_bdev, FMODE_WRITE | FMODE_READ, 0);
 	if (ret) {
 		reg->hr_bdev = NULL;



More information about the Ocfs2-commits mailing list