From 37975f1503715c51c1a2484b8aba2700a23e6b56 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Thu, 9 Oct 2014 22:49:21 +0200 Subject: GFS2: directly return gfs2_dir_check() No need to store gfs2_dir_check result and test it before returning. Signed-off-by: Fabian Frederick Signed-off-by: Steven Whitehouse --- fs/gfs2/inode.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fs') diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index c4ed823d150e..b41b5c7898da 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1045,11 +1045,7 @@ static int gfs2_unlink_ok(struct gfs2_inode *dip, const struct qstr *name, if (error) return error; - error = gfs2_dir_check(&dip->i_inode, name, ip); - if (error) - return error; - - return 0; + return gfs2_dir_check(&dip->i_inode, name, ip); } /** -- cgit v1.2.3