diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-09-01 14:39:09 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-09-01 14:39:09 -0400 |
commit | b7ea89ad0a6b855172158a999d3f5008403f4011 (patch) | |
tree | f5e4df616627e426bdebef94042c286fbdff0360 /fs/ext4/migrate.c | |
parent | 523f431ccfffd3022e80e13befb9594f54b5607e (diff) | |
download | linux-b7ea89ad0a6b855172158a999d3f5008403f4011.tar.bz2 |
ext4: allow a NULL argument to ext4_ext_drop_refs()
Teach ext4_ext_drop_refs() to accept a NULL argument, much like
kfree(). This allows us to drop a lot of checks to make sure path is
non-NULL before calling ext4_ext_drop_refs().
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/migrate.c')
-rw-r--r-- | fs/ext4/migrate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index aff7bdfdc461..061c300703c7 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -84,10 +84,8 @@ static int finish_range(handle_t *handle, struct inode *inode, retval = ext4_ext_insert_extent(handle, inode, &path, &newext, 0); err_out: up_write((&EXT4_I(inode)->i_data_sem)); - if (path) { - ext4_ext_drop_refs(path); - kfree(path); - } + ext4_ext_drop_refs(path); + kfree(path); lb->first_pblock = 0; return retval; } |