]> git.baikalelectronics.ru Git - kernel.git/commit
locks: fix list insertion when lock is split in two
authorJeff Layton <jeff.layton@primarydata.com>
Tue, 17 Feb 2015 22:08:23 +0000 (17:08 -0500)
committerJeff Layton <jeff.layton@primarydata.com>
Tue, 17 Feb 2015 22:08:23 +0000 (17:08 -0500)
commit5aed6e00b4362afee73e59c2e481dd98703d6c06
treee68195e69bebc73b002f3354dc388c83d703a8f5
parent25dfd21af1098393659dbcac213f9db3f92ed22f
locks: fix list insertion when lock is split in two

In the case where we're splitting a lock in two, the current code
the new "left" lock in the incorrect spot. It's inserted just
before "right" when it should instead be inserted just before the
new lock.

When we add a new lock, set "fl" to that value so that we can
add "left" before it.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
fs/locks.c