+
+ /* Populate the gl_work structure.
+ * Grab additional reference on the lock which will be released in
+ * ldlm_work_gl_ast_lock() */
+ gl_work.gl_lock = LDLM_LOCK_GET(l);
+ /* The glimpse callback is sent to one single extent lock. As a result,
+ * the gl_work list is just composed of one element */
+ cfs_list_add_tail(&gl_work.gl_list, &gl_list);
+ /* the ldlm_glimpse_work structure is allocated on the stack */
+ gl_work.gl_flags = LDLM_GL_WORK_NOFREE;
+
+ rc = ldlm_glimpse_locks(res, &gl_list); /* this will update the LVB */
+
+ if (!cfs_list_empty(&gl_list))
+ LDLM_LOCK_RELEASE(l);