patch-2.3.37 linux/fs/inode.c

Next file: linux/fs/isofs/inode.c
Previous file: linux/fs/fifo.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.36/linux/fs/inode.c linux/fs/inode.c
@@ -257,7 +257,10 @@
 		DQUOT_DROP(inode);
 	if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->clear_inode)
 		inode->i_sb->s_op->clear_inode(inode);
-
+	if (inode->i_bdev) {
+		bdput(inode->i_bdev);
+		inode->i_bdev = NULL;
+	}
 	inode->i_state = 0;
 }
 
@@ -472,6 +475,7 @@
 	inode->i_generation = 0;
 	memset(&inode->i_dquot, 0, sizeof(inode->i_dquot));
 	inode->i_pipe = NULL;
+	inode->i_bdev = NULL;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)