aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 2045d70753f1..898e62ed5b85 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1681,7 +1681,6 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry)
1681 const struct qstr *name = &dentry->d_name; 1681 const struct qstr *name = &dentry->d_name;
1682 struct gfs2_dirent *dent, *prev = NULL; 1682 struct gfs2_dirent *dent, *prev = NULL;
1683 struct buffer_head *bh; 1683 struct buffer_head *bh;
1684 int error;
1685 1684
1686 /* Returns _either_ the entry (if its first in block) or the 1685 /* Returns _either_ the entry (if its first in block) or the
1687 previous entry otherwise */ 1686 previous entry otherwise */
@@ -1710,22 +1709,15 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry)
1710 } 1709 }
1711 brelse(bh); 1710 brelse(bh);
1712 1711
1713 error = gfs2_meta_inode_buffer(dip, &bh);
1714 if (error)
1715 return error;
1716
1717 if (!dip->i_entries) 1712 if (!dip->i_entries)
1718 gfs2_consist_inode(dip); 1713 gfs2_consist_inode(dip);
1719 gfs2_trans_add_bh(dip->i_gl, bh, 1);
1720 dip->i_entries--; 1714 dip->i_entries--;
1721 dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME; 1715 dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME;
1722 if (S_ISDIR(dentry->d_inode->i_mode)) 1716 if (S_ISDIR(dentry->d_inode->i_mode))
1723 drop_nlink(&dip->i_inode); 1717 drop_nlink(&dip->i_inode);
1724 gfs2_dinode_out(dip, bh->b_data);
1725 brelse(bh);
1726 mark_inode_dirty(&dip->i_inode); 1718 mark_inode_dirty(&dip->i_inode);
1727 1719
1728 return error; 1720 return 0;
1729} 1721}
1730 1722
1731/** 1723/**