<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ocfs2/locks.c, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-12-30T01:45:49Z</updated>
<entry>
<title>ocfs2: fix flock panic issue</title>
<updated>2015-12-30T01:45:49Z</updated>
<author>
<name>Junxiao Bi</name>
</author>
<published>2015-12-29T22:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5a8bc338e68d5f6f753e14ae59b30e75a5ffdde'/>
<id>urn:sha1:b5a8bc338e68d5f6f753e14ae59b30e75a5ffdde</id>
<content type='text'>
Commit 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
move flock/posix lock indentify code to locks_lock_inode_wait(), but
missed to set fl_flags to FL_FLOCK which caused the following kernel
panic on 4.4.0_rc5.

  kernel BUG at fs/locks.c:1895!
  invalid opcode: 0000 [#1] SMP
  Modules linked in: ocfs2(O) ocfs2_dlmfs(O) ocfs2_stack_o2cb(O) ocfs2_dlm(O) ocfs2_nodemanager(O) ocfs2_stackglue(O) iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi xen_kbdfront xen_netfront xen_fbfront xen_blkfront
  CPU: 0 PID: 20268 Comm: flock_unit_test Tainted: G           O    4.4.0-rc5-next-20151217 #1
  Hardware name: Xen HVM domU, BIOS 4.3.1OVM 05/14/2014
  task: ffff88007b3672c0 ti: ffff880028b58000 task.ti: ffff880028b58000
  RIP: locks_lock_inode_wait+0x2e/0x160
  Call Trace:
    ocfs2_do_flock+0x91/0x160 [ocfs2]
    ocfs2_flock+0x76/0xd0 [ocfs2]
    SyS_flock+0x10f/0x1a0
    entry_SYSCALL_64_fastpath+0x12/0x71
  Code: e5 41 57 41 56 49 89 fe 41 55 41 54 53 48 89 f3 48 81 ec 88 00 00 00 8b 46 40 83 e0 03 83 f8 01 0f 84 ad 00 00 00 83 f8 02 74 04 &lt;0f&gt; 0b eb fe 4c 8d ad 60 ff ff ff 4c 8d 7b 58 e8 0e 8e 73 00 4d
  RIP  locks_lock_inode_wait+0x2e/0x160
   RSP &lt;ffff880028b5bce8&gt;
  ---[ end trace dfca74ec9b5b274c ]---

Fixes: 4f6563677ae8 ("Move locks API users to locks_lock_inode_wait()")
Signed-off-by: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Move locks API users to locks_lock_inode_wait()</title>
<updated>2015-10-22T18:57:36Z</updated>
<author>
<name>Benjamin Coddington</name>
</author>
<published>2015-10-22T17:38:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f6563677ae833baad8003e14353241bc25da4fc'/>
<id>urn:sha1:4f6563677ae833baad8003e14353241bc25da4fc</id>
<content type='text'>
Instead of having users check for FL_POSIX or FL_FLOCK to call the correct
locks API function, use the check within locks_lock_inode_wait().  This
allows for some later cleanup.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: flock: drop cross-node lock when failed locally</title>
<updated>2014-04-03T23:20:56Z</updated>
<author>
<name>Wengang Wang</name>
</author>
<published>2014-04-03T21:47:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e228f6439862359f9b26f9d62634e4fce180b54a'/>
<id>urn:sha1:e228f6439862359f9b26f9d62634e4fce180b54a</id>
<content type='text'>
ocfs2_do_flock() calls ocfs2_file_lock() to get the cross-node clock and
then call flock_lock_file_wait() to compete with local processes.  In
case flock_lock_file_wait() failed, say -ENOMEM, clean up work is not
done.  This patch adds the cleanup --drop the cross-node lock which was
just granted.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Wengang Wang &lt;wen.gang.wang@oracle.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: remove INODE from unused files.</title>
<updated>2011-02-21T03:18:23Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2011-02-21T03:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da561c9cfa3022f6134ef52686d52931d3d1df3d'/>
<id>urn:sha1:da561c9cfa3022f6134ef52686d52931d3d1df3d</id>
<content type='text'>
As there are no such debug information in fs/ocfs2/ioctl.c,
fs/ocfs2/locks.c and fs/ocfs2/sysfile.c, ML_INODE are also
removed.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] Skip check for mandatory locks when unlocking</title>
<updated>2010-03-17T19:07:16Z</updated>
<author>
<name>Sachin Prabhu</name>
</author>
<published>2010-03-10T15:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee860b6a650360c91f5d5f9a94262aad9be90015'/>
<id>urn:sha1:ee860b6a650360c91f5d5f9a94262aad9be90015</id>
<content type='text'>
ocfs2_lock() will skip locks on file which has mode set to 02666. This
is a problem in cases where the mode of the file is changed after a
process has obtained a lock on the file.

ocfs2_lock() should skip the check for mandatory locks when unlocking a
file.

Signed-off-by: Sachin Prabhu &lt;sprabhu@redhat.com&gt;
Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: POSIX file locks support</title>
<updated>2008-10-13T20:57:57Z</updated>
<author>
<name>Mark Fasheh</name>
</author>
<published>2008-07-21T21:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53da4939f349d4edd283b043219221ca5b78e4d4'/>
<id>urn:sha1:53da4939f349d4edd283b043219221ca5b78e4d4</id>
<content type='text'>
This is actually pretty easy since fs/dlm already handles the bulk of the
work. The Ocfs2 userspace cluster stack module already uses fs/dlm as the
underlying lock manager, so I only had to add the right calls.

Cluster-aware POSIX locks ("plocks") can be turned off by the same means at
UNIX locks - mount with 'noflocks', or create a local-only Ocfs2 volume.
Internally, the file system uses two sets of file_operations, depending on
whether cluster aware plocks is required. This turns out to be easier than
implementing local-only versions of -&gt;lock.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>[PATCH 2/2] ocfs2: cluster aware flock()</title>
<updated>2008-01-25T23:05:43Z</updated>
<author>
<name>Mark Fasheh</name>
</author>
<published>2007-12-21T00:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53fc622b9e829c8e632e45ef8c14f054388759c1'/>
<id>urn:sha1:53fc622b9e829c8e632e45ef8c14f054388759c1</id>
<content type='text'>
Hook up ocfs2_flock(), using the new flock lock type in dlmglue.c. A new
mount option, "localflocks" is added so that users can revert to old
functionality as need be.

Signed-off-by: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
</content>
</entry>
</feed>
