summaryrefslogtreecommitdiff
path: root/fs/gfs2/locking/nolock/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/locking/nolock/main.c')
-rw-r--r--fs/gfs2/locking/nolock/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c
index 284a5ece8d94..627bfb79bc8c 100644
--- a/fs/gfs2/locking/nolock/main.c
+++ b/fs/gfs2/locking/nolock/main.c
@@ -107,6 +107,8 @@ static void nolock_put_lock(void *lock)
static unsigned int nolock_lock(void *lock, unsigned int cur_state,
unsigned int req_state, unsigned int flags)
{
+ if (req_state == LM_ST_UNLOCKED)
+ return 0;
return req_state | LM_OUT_CACHEABLE;
}