]> git.karo-electronics.de Git - karo-tx-linux.git/commit
GFS2: Clean up inode creation path
authorSteven Whitehouse <swhiteho@redhat.com>
Tue, 26 Feb 2013 16:15:20 +0000 (16:15 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 4 Mar 2013 09:30:13 +0000 (09:30 +0000)
commit41dac21cb18bf848cedf3da0dfd6c3e4156785a9
tree7b0cd886615217e749aca54366d48f2ac72815d6
parent6dbe51c251a327e012439c4772097a13df43c5b8
GFS2: Clean up inode creation path

This patch cleans up the inode creation code path in GFS2. After the
Orlov allocator was merged, a number of potential improvements are
now possible, and this is a first set of these.

The quota handling is now updated so that it matches the point in
the code where the allocation takes place. This means that the one
exception in gfs2_alloc_blocks relating to quota is now no longer
required, and we can use the generic code everywhere.

In addition the call to figure out whether we need to allocate any
extra blocks in order to add a directory entry is moved higher up
gfs2_create_inode. This means that if it returns an error, we
can deal with that at a stage where it is easier to handle that case.
The returned status cannot change during the function since we hold
an exclusive lock on the directory.

Two calls to gfs2_rindex_update have been changed to one, again at
the top of gfs2_create_inode to simplify error handling.

The time stamps are also now initialised earlier in the creation
process, this is gradually moving towards being able to remove the
call to gfs2_refresh_inode in gfs2_inode_create once we have all the
fields covered.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/inode.c
fs/gfs2/rgrp.c