diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-18 05:31:23 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-11-18 05:57:58 -0500 |
commit | 30badc9543490f41497c42f004db02f1e8a29341 (patch) | |
tree | dc35b07393d753b2b7b51d7c3a6769ac9c44e47f /fs/gfs2 | |
parent | 2e60d7683c8d2ea21317f6d9f4cd3bf5428ce162 (diff) |
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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/glock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 8f0c19d1d943..a23524aa3eac 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -836,8 +836,7 @@ void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder * | |||
836 | gh->gh_flags = flags; | 836 | gh->gh_flags = flags; |
837 | gh->gh_iflags = 0; | 837 | gh->gh_iflags = 0; |
838 | gh->gh_ip = _RET_IP_; | 838 | gh->gh_ip = _RET_IP_; |
839 | if (gh->gh_owner_pid) | 839 | put_pid(gh->gh_owner_pid); |
840 | put_pid(gh->gh_owner_pid); | ||
841 | gh->gh_owner_pid = get_pid(task_pid(current)); | 840 | gh->gh_owner_pid = get_pid(task_pid(current)); |
842 | } | 841 | } |
843 | 842 | ||