summaryrefslogtreecommitdiff
path: root/fs/ext4/extents_status.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-09-01 22:39:09 +0400
committerTheodore Ts'o <tytso@mit.edu>2014-09-01 22:39:09 +0400
commitb7ea89ad0a6b855172158a999d3f5008403f4011 (patch)
treef5e4df616627e426bdebef94042c286fbdff0360 /fs/ext4/extents_status.c
parent523f431ccfffd3022e80e13befb9594f54b5607e (diff)
downloadlinux-b7ea89ad0a6b855172158a999d3f5008403f4011.tar.xz
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/extents_status.c')
-rw-r--r--fs/ext4/extents_status.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 0b7e28e7eaa4..8ffff966d594 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -499,10 +499,8 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
}
}
out:
- if (path) {
- ext4_ext_drop_refs(path);
- kfree(path);
- }
+ ext4_ext_drop_refs(path);
+ kfree(path);
}
static void ext4_es_insert_extent_ind_check(struct inode *inode,