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

Commit 796dadfd authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Linus Torvalds
Browse files

[PATCH] nfsd4: fix check_for_locks



Fix some bad logic.

Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 04ef5954
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2989,10 +2989,11 @@ check_for_locks(struct file *filp, struct nfs4_stateowner *lowner)


	lock_kernel();
	lock_kernel();
	for (flpp = &inode->i_flock; *flpp != NULL; flpp = &(*flpp)->fl_next) {
	for (flpp = &inode->i_flock; *flpp != NULL; flpp = &(*flpp)->fl_next) {
		if ((*flpp)->fl_owner == (fl_owner_t)lowner)
		if ((*flpp)->fl_owner == (fl_owner_t)lowner) {
			status = 1;
			status = 1;
			goto out;
			goto out;
		}
		}
	}
out:
out:
	unlock_kernel();
	unlock_kernel();
	return status;
	return status;