Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30badc95 authored by Markus Elfring's avatar Markus Elfring Committed by Steven Whitehouse
Browse files

GFS2: Deletion of unnecessary checks before two function calls



The functions iput() and put_pid() test whether their argument is NULL
and then return immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 2e60d768
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -836,7 +836,6 @@ void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder *
	gh->gh_flags = flags;
	gh->gh_iflags = 0;
	gh->gh_ip = _RET_IP_;
	if (gh->gh_owner_pid)
	put_pid(gh->gh_owner_pid);
	gh->gh_owner_pid = get_pid(task_pid(current));
}