]> git.karo-electronics.de Git - linux-beck.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, 8 Apr 2013 07:39:56 +0000 (08:39 +0100)
commitfd4b4e042c6aac980ccac0e829aa1378d2c17bd5
treefbb997693736724c2484fe219911d1dde609f090
parent31880c37c11e28cb81c70757e38392b42e695dc6
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