|
@@ -661,14 +661,13 @@ void gfs2_rs_deltree(struct gfs2_blkreserv *rs)
|
|
|
/**
|
|
|
* gfs2_rs_delete - delete a multi-block reservation
|
|
|
* @ip: The inode for this reservation
|
|
|
+ * @wcount: The inode's write count, or NULL
|
|
|
*
|
|
|
*/
|
|
|
-void gfs2_rs_delete(struct gfs2_inode *ip)
|
|
|
+void gfs2_rs_delete(struct gfs2_inode *ip, atomic_t *wcount)
|
|
|
{
|
|
|
- struct inode *inode = &ip->i_inode;
|
|
|
-
|
|
|
down_write(&ip->i_rw_mutex);
|
|
|
- if (ip->i_res && atomic_read(&inode->i_writecount) <= 1) {
|
|
|
+ if (ip->i_res && ((wcount == NULL) || (atomic_read(wcount) <= 1))) {
|
|
|
gfs2_rs_deltree(ip->i_res);
|
|
|
BUG_ON(ip->i_res->rs_free);
|
|
|
kmem_cache_free(gfs2_rsrv_cachep, ip->i_res);
|