diff options
author | Eric Sandeen <sandeen@redhat.com> | 2011-10-26 03:32:07 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-10-26 03:32:07 -0400 |
commit | 665436175c3ca9d35f135e1ba6bdd63745cff08a (patch) | |
tree | 79202f22b3b3f9dc4fc71e2b7e34d056c0f5ee5c /fs/ext4 | |
parent | 909a4cf1ffe4b875c87abf38239a9bfd25167e0c (diff) |
ext4: use ext4_reserve_inode_write in ext4_xattr_set_handle
ext4_mark_iloc_dirty() says:
* The caller must have previously called ext4_reserve_inode_write().
* Give this, we know that the caller already has write access to iloc->bh.
ext4_xattr_set_handle, however, just open-codes it. May as well use
the helper function for consistency.
No bug here, just tidiness.
(Note: on cleanup path, ext4_reserve_inode_write sets
the bh to NULL if it returns an error, and brelse() of
a null bh is handled gracefully).
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/xattr.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index c757adc9725..0ae3668520f 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -985,11 +985,7 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, | |||
985 | no_expand = ext4_test_inode_state(inode, EXT4_STATE_NO_EXPAND); | 985 | no_expand = ext4_test_inode_state(inode, EXT4_STATE_NO_EXPAND); |
986 | ext4_set_inode_state(inode, EXT4_STATE_NO_EXPAND); | 986 | ext4_set_inode_state(inode, EXT4_STATE_NO_EXPAND); |
987 | 987 | ||
988 | error = ext4_get_inode_loc(inode, &is.iloc); | 988 | error = ext4_reserve_inode_write(handle, inode, &is.iloc); |
989 | if (error) | ||
990 | goto cleanup; | ||
991 | |||
992 | error = ext4_journal_get_write_access(handle, is.iloc.bh); | ||
993 | if (error) | 989 | if (error) |
994 | goto cleanup; | 990 | goto cleanup; |
995 | 991 | ||