]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: hsm: Fix lu_ref for lease handle
authorJinshan Xiong <jinshan.xiong@intel.com>
Tue, 5 Apr 2016 01:36:51 +0000 (21:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 03:47:04 +0000 (20:47 -0700)
The lu_ref was not being decremented when releasing the
lease handle.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3647
Reviewed-on: http://review.whamcloud.com/7243
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/mdc/mdc_lib.c

index 02b57835ca04967cdbd4974d20d0a82ca90544ae..000ea58fbdd66ed5906a7bdbf9f3c5e3a1f2ea50 100644 (file)
@@ -908,7 +908,7 @@ static int ll_lease_close(struct obd_client_handle *och, struct inode *inode,
                lock_res_and_lock(lock);
                cancelled = ldlm_is_cancel(lock);
                unlock_res_and_lock(lock);
-               ldlm_lock_put(lock);
+               LDLM_LOCK_PUT(lock);
        }
 
        CDEBUG(D_INODE, "lease for " DFID " broken? %d\n",
@@ -2509,7 +2509,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                                        rc = och->och_flags &
                                                (FMODE_READ | FMODE_WRITE);
                                unlock_res_and_lock(lock);
-                               ldlm_lock_put(lock);
+                               LDLM_LOCK_PUT(lock);
                        }
                }
                mutex_unlock(&lli->lli_och_mutex);
index be0acf7feee3ab40e01bf876b60fa3c9e261e79d..53cd56f286b7e0c006000a34391dac2eb1df57e4 100644 (file)
@@ -454,7 +454,7 @@ static void mdc_hsm_release_pack(struct ptlrpc_request *req,
                lock = ldlm_handle2lock(&op_data->op_lease_handle);
                if (lock) {
                        data->cd_handle = lock->l_remote_handle;
-                       ldlm_lock_put(lock);
+                       LDLM_LOCK_PUT(lock);
                }
                ldlm_cli_cancel(&op_data->op_lease_handle, LCF_LOCAL);