aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2012-11-30 20:56:25 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2012-12-10 23:43:44 -0500
commit61412b64b965af72798000c3c921e88db31216b1 (patch)
tree8d078a7feb21c9a5bb4d7e1bbe479275671e543b /fs/f2fs/namei.c
parent1042d60f917d78ef1a6eaea297a1020484d4bf74 (diff)
f2fs: move error condition for mkdir at proper place
In function f2fs_mkdir, err is being initialized without even checking if there was any error in new inode creation. So, instead check the inode error and make use of error/return condition. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 63efd77fab92..2d720ca47071 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -287,9 +287,8 @@ static int f2fs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
287 int err; 287 int err;
288 288
289 inode = f2fs_new_inode(dir, S_IFDIR | mode); 289 inode = f2fs_new_inode(dir, S_IFDIR | mode);
290 err = PTR_ERR(inode);
291 if (IS_ERR(inode)) 290 if (IS_ERR(inode))
292 return err; 291 return PTR_ERR(inode);
293 292
294 inode->i_op = &f2fs_dir_inode_operations; 293 inode->i_op = &f2fs_dir_inode_operations;
295 inode->i_fop = &f2fs_dir_operations; 294 inode->i_fop = &f2fs_dir_operations;