aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/inode.c2
-rw-r--r--include/linux/fs.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 77e254792025..41b462232f7f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -254,7 +254,7 @@ void clear_inode(struct inode *inode)
254 DQUOT_DROP(inode); 254 DQUOT_DROP(inode);
255 if (inode->i_sb && inode->i_sb->s_op->clear_inode) 255 if (inode->i_sb && inode->i_sb->s_op->clear_inode)
256 inode->i_sb->s_op->clear_inode(inode); 256 inode->i_sb->s_op->clear_inode(inode);
257 if (inode->i_bdev) 257 if (S_ISBLK(inode->i_mode) && inode->i_bdev)
258 bd_forget(inode); 258 bd_forget(inode);
259 if (inode->i_cdev) 259 if (inode->i_cdev)
260 cd_forget(inode); 260 cd_forget(inode);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ca695fc8d69c..98ff684a5b1c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -531,8 +531,8 @@ struct inode {
531 struct list_head i_devices; 531 struct list_head i_devices;
532 union { 532 union {
533 struct pipe_inode_info *i_pipe; 533 struct pipe_inode_info *i_pipe;
534 struct block_device *i_bdev;
534 }; 535 };
535 struct block_device *i_bdev;
536 struct cdev *i_cdev; 536 struct cdev *i_cdev;
537 int i_cindex; 537 int i_cindex;
538 538