VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> 2014-12-29 15:00:18 +0200 committer: Eric Van Hensbergen <ericvh@gmail.com> 2015-03-20 07:34:41 -0700 commit: ad80492df56b4bd2d4da9990678d87b66af42f54 parent: 9bfc52c1091c871cbc58390874b5c4ebe266bee0
Commit Summary:
9p: fix error handling in v9fs_file_do_lock
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index b40133796b87..8d29e1e03dfa 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -194,7 +194,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
 	for (;;) {
 		res = p9_client_lock_dotl(fid, &flock, &status);
 		if (res < 0)
-			break;
+			goto out_unlock;
 
 		if (status != P9_LOCK_BLOCKED)
 			break;
@@ -220,6 +220,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
 		BUG();
 	}
 
+out_unlock:
 	/*
 	 * incase server returned error for lock request, revert
 	 * it locally