diff options
-rw-r--r-- | fs/cifs/file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 99897e3562a..2ba4c41be97 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -922,9 +922,10 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) 1, 0, li->type, false); if (stored_rc) rc = stored_rc; - - list_del(&li->llist); - kfree(li); + else { + list_del(&li->llist); + kfree(li); + } } } mutex_unlock(&fid->lock_mutex); |