aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-01-21 18:31:38 +0900
committerrogersb11 <brettrogers11@gmail.com>2016-02-13 21:42:50 -0500
commit0a93ae79e3220fb2f34611a035902f9f1cc6d263 (patch)
tree7f4f9f6bc8d4b3d0d0e5469054a1844eb3002da5 /fs
parentd13404be3e5ec3d377b02f3c5e45fa1835fcf99c (diff)
downloadkernel_samsung_smdk4412-0a93ae79e3220fb2f34611a035902f9f1cc6d263.tar.gz
kernel_samsung_smdk4412-0a93ae79e3220fb2f34611a035902f9f1cc6d263.tar.bz2
kernel_samsung_smdk4412-0a93ae79e3220fb2f34611a035902f9f1cc6d263.zip
f2fs: move a branch for code redability
This patch moves a function in f2fs_delete_entry for code readability. Change-Id: I00419bcbd9d353a95491af6d8ec8e418b45171f3 Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/dir.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 673605b02f6..96de7c9e939 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -550,12 +550,11 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,
dir->i_ctime = dir->i_mtime = CURRENT_TIME;
- if (inode && S_ISDIR(inode->i_mode)) {
- drop_nlink(dir);
- update_inode_page(dir);
- }
-
if (inode) {
+ if (S_ISDIR(inode->i_mode)) {
+ drop_nlink(dir);
+ update_inode_page(dir);
+ }
inode->i_ctime = CURRENT_TIME;
drop_nlink(inode);
if (S_ISDIR(inode->i_mode)) {