Commit ed559daa authored by Edward Shishkin's avatar Edward Shishkin Committed by james toy

Update names of quota methods

Signed-off-by: Edward Shishkin<edward.shishkin@gmail.com>
Acked-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4c805f1a
......@@ -944,8 +944,8 @@ common_object_delete_no_reserve(struct inode *inode/* object to remove */)
if (!reiser4_inode_get_flag(inode, REISER4_NO_SD)) {
reiser4_key sd_key;
DQUOT_FREE_INODE(inode);
DQUOT_DROP(inode);
vfs_dq_free_inode(inode);
vfs_dq_drop(inode);
build_sd_key(inode, &sd_key);
result =
......
......@@ -453,7 +453,7 @@ int reiser4_setattr_common(struct dentry *dentry, struct iattr *attr)
if ((attr->ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid)
|| (attr->ia_valid & ATTR_GID
&& attr->ia_gid != inode->i_gid)) {
result = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
result = vfs_dq_transfer(inode, attr) ? -EDQUOT : 0;
if (result) {
context_set_commit_async(ctx);
reiser4_exit_context(ctx);
......@@ -593,8 +593,8 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
/* So that on error iput will be called. */
*retobj = object;
if (DQUOT_ALLOC_INODE(object)) {
DQUOT_DROP(object);
if (vfs_dq_alloc_inode(object)) {
vfs_dq_drop(object);
object->i_flags |= S_NOQUOTA;
return RETERR(-EDQUOT);
}
......@@ -608,7 +608,7 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
if (result) {
warning("nikita-431", "Cannot install plugin %i on %llx",
data->id, (unsigned long long)get_inode_oid(object));
DQUOT_FREE_INODE(object);
vfs_dq_free_inode(object);
object->i_flags |= S_NOQUOTA;
return result;
}
......@@ -617,7 +617,7 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
obj_plug = inode_file_plugin(object);
if (obj_plug->create_object == NULL) {
DQUOT_FREE_INODE(object);
vfs_dq_free_inode(object);
object->i_flags |= S_NOQUOTA;
return RETERR(-EPERM);
}
......@@ -636,7 +636,7 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
warning("nikita-432", "Cannot inherit from %llx to %llx",
(unsigned long long)get_inode_oid(parent),
(unsigned long long)get_inode_oid(object));
DQUOT_FREE_INODE(object);
vfs_dq_free_inode(object);
object->i_flags |= S_NOQUOTA;
return result;
}
......@@ -652,7 +652,7 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
/* obtain directory plugin (if any) for new object. */
obj_dir = inode_dir_plugin(object);
if (obj_dir != NULL && obj_dir->init == NULL) {
DQUOT_FREE_INODE(object);
vfs_dq_free_inode(object);
object->i_flags |= S_NOQUOTA;
return RETERR(-EPERM);
}
......@@ -661,7 +661,7 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
reserve = estimate_create_vfs_object(parent, object);
if (reiser4_grab_space(reserve, BA_CAN_COMMIT)) {
DQUOT_FREE_INODE(object);
vfs_dq_free_inode(object);
object->i_flags |= S_NOQUOTA;
return RETERR(-ENOSPC);
}
......@@ -692,7 +692,7 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
warning("nikita-2219",
"Failed to create sd for %llu",
(unsigned long long)get_inode_oid(object));
DQUOT_FREE_INODE(object);
vfs_dq_free_inode(object);
object->i_flags |= S_NOQUOTA;
return result;
}
......@@ -735,7 +735,7 @@ static int do_create_vfs_child(reiser4_object_create_data * data,/* parameters
*/
reiser4_update_sd(object);
if (result != 0) {
DQUOT_FREE_INODE(object);
vfs_dq_free_inode(object);
object->i_flags |= S_NOQUOTA;
/* if everything was ok (result == 0), parent stat-data is
* already updated above (update_parent_dir()) */
......
......@@ -932,7 +932,7 @@ int add_entry_cde(struct inode *dir /* directory object */ ,
data.length = estimate_cde(result ? coord : NULL, &data);
/* NOTE-NIKITA quota plugin? */
if (DQUOT_ALLOC_SPACE_NODIRTY(dir, cde_bytes(result, &data)))
if (vfs_dq_alloc_space_nodirty(dir, cde_bytes(result, &data)))
return RETERR(-EDQUOT);
if (result)
......@@ -983,7 +983,7 @@ int rem_entry_cde(struct inode *dir /* directory of item */ ,
kill_node_content(coord, &shadow, NULL, NULL, NULL, NULL, NULL, 0);
if (result == 0) {
/* NOTE-NIKITA quota plugin? */
DQUOT_FREE_SPACE_NODIRTY(dir, length);
vfs_dq_free_space_nodirty(dir, length);
}
return result;
}
......
......@@ -260,7 +260,7 @@ static int append_last_extent(uf_coord_t *uf_coord, const reiser4_key *key,
assert("", get_key_offset(key) == (loff_t)index_jnode(jnodes[0]) * PAGE_CACHE_SIZE);
result = DQUOT_ALLOC_BLOCK_NODIRTY(mapping_jnode(jnodes[0])->host,
result = vfs_dq_alloc_block_nodirty(mapping_jnode(jnodes[0])->host,
count);
BUG_ON(result != 0);
......@@ -408,7 +408,8 @@ static int insert_first_extent(uf_coord_t *uf_coord, const reiser4_key *key,
if (count == 0)
return 0;
result = DQUOT_ALLOC_BLOCK_NODIRTY(mapping_jnode(jnodes[0])->host, count);
result = vfs_dq_alloc_block_nodirty(mapping_jnode(jnodes[0])->host,
count);
BUG_ON(result != 0);
/*
......@@ -622,7 +623,8 @@ static int overwrite_one_block(uf_coord_t *uf_coord, const reiser4_key *key,
break;
case HOLE_EXTENT:
result = DQUOT_ALLOC_BLOCK_NODIRTY(mapping_jnode(node)->host, 1);
result = vfs_dq_alloc_block_nodirty(mapping_jnode(node)->host,
1);
BUG_ON(result != 0);
result = plug_hole(uf_coord, key, &how);
if (result)
......
......@@ -468,7 +468,7 @@ kill_hook_extent(const coord_t * coord, pos_in_node_t from, pos_in_node_t count,
length = to_off - offset;
}
DQUOT_FREE_BLOCK_NODIRTY(inode, length);
vfs_dq_free_block_nodirty(inode, length);
if (state_of_extent(ext) == UNALLOCATED_EXTENT) {
/* some jnodes corresponding to this unallocated extent */
......
......@@ -120,7 +120,7 @@ int add_entry_de(struct inode *dir /* directory of item */ ,
data.iplug = item_plugin_by_id(SIMPLE_DIR_ENTRY_ID);
/* NOTE-NIKITA quota plugin */
if (DQUOT_ALLOC_SPACE_NODIRTY(dir, data.length))
if (vfs_dq_alloc_space_nodirty(dir, data.length))
return -EDQUOT;
result = insert_by_coord(coord, &data, &entry->key, lh, 0 /*flags */ );
......@@ -168,7 +168,7 @@ int rem_entry_de(struct inode *dir /* directory of item */ ,
kill_node_content(coord, &shadow, NULL, NULL, NULL, NULL, NULL, 0);
if (result == 0) {
/* NOTE-NIKITA quota plugin */
DQUOT_FREE_SPACE_NODIRTY(dir, length);
vfs_dq_free_space_nodirty(dir, length);
}
return result;
}
......
......@@ -494,11 +494,11 @@ static ssize_t insert_first_tail(struct inode *inode, flow_t *flow,
* were real data which are all zeros. Therefore we have to
* allocate quota here as well
*/
if (DQUOT_ALLOC_SPACE_NODIRTY(inode, flow->length))
if (vfs_dq_alloc_space_nodirty(inode, flow->length))
return RETERR(-EDQUOT);
result = reiser4_insert_flow(coord, lh, flow);
if (flow->length)
DQUOT_FREE_SPACE_NODIRTY(inode, flow->length);
vfs_dq_free_space_nodirty(inode, flow->length);
uf_info = unix_file_inode_data(inode);
......@@ -518,13 +518,13 @@ static ssize_t insert_first_tail(struct inode *inode, flow_t *flow,
}
/* check quota before appending data */
if (DQUOT_ALLOC_SPACE_NODIRTY(inode, flow->length))
if (vfs_dq_alloc_space_nodirty(inode, flow->length))
return RETERR(-EDQUOT);
to_write = flow->length;
result = reiser4_insert_flow(coord, lh, flow);
if (flow->length)
DQUOT_FREE_SPACE_NODIRTY(inode, flow->length);
vfs_dq_free_space_nodirty(inode, flow->length);
return (to_write - flow->length) ? (to_write - flow->length) : result;
}
......@@ -553,22 +553,22 @@ static ssize_t append_tail(struct inode *inode,
* were real data which are all zeros. Therefore we have to
* allocate quota here as well
*/
if (DQUOT_ALLOC_SPACE_NODIRTY(inode, flow->length))
if (vfs_dq_alloc_space_nodirty(inode, flow->length))
return RETERR(-EDQUOT);
result = reiser4_insert_flow(coord, lh, flow);
if (flow->length)
DQUOT_FREE_SPACE_NODIRTY(inode, flow->length);
vfs_dq_free_space_nodirty(inode, flow->length);
return result;
}
/* check quota before appending data */
if (DQUOT_ALLOC_SPACE_NODIRTY(inode, flow->length))
if (vfs_dq_alloc_space_nodirty(inode, flow->length))
return RETERR(-EDQUOT);
to_write = flow->length;
result = reiser4_insert_flow(coord, lh, flow);
if (flow->length)
DQUOT_FREE_SPACE_NODIRTY(inode, flow->length);
vfs_dq_free_space_nodirty(inode, flow->length);
return (to_write - flow->length) ? (to_write - flow->length) : result;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment