Whamcloud - gitweb
LU-7402 llite: correct request handling after ll_lookup_it() 68/17068/2
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 6 Nov 2015 15:39:17 +0000 (09:39 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Apr 2016 15:47:48 +0000 (15:47 +0000)
In the FIFO cases of ll_atomic_open() and ll_lookup_nd() remove
spurious calls to ptlrpc_req_finished(). Explain that these cases are
unreachable in practice anyway.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic7d677674ed7f9e52d039bb81259f60bc75ba71b
Reviewed-on: http://review.whamcloud.com/17068
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/namei.c

index 021fc0f..c0fa6a9 100644 (file)
@@ -732,13 +732,9 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
                if (dentry->d_inode && it_disposition(it, DISP_OPEN_OPEN)) {
                        /* Open dentry. */
                        if (S_ISFIFO(dentry->d_inode->i_mode)) {
-                               /* We cannot call open here as it would
-                                * deadlock.
-                                */
-                               if (it_disposition(it, DISP_ENQ_OPEN_REF))
-                                       ptlrpc_req_finished(
-                                                      (struct ptlrpc_request *)
-                                                         it->d.lustre.it_data);
+                               /* We cannot call open here as it might
+                                * deadlock. This case is unreachable in
+                                * practice because of OBD_CONNECT_NODEVOH. */
                                rc = finish_no_open(file, de);
                        } else {
                                file->private_data = it;
@@ -814,11 +810,10 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,
                         if (dentry->d_inode &&
                             it_disposition(it, DISP_OPEN_OPEN)) { /* nocreate */
                                 if (S_ISFIFO(dentry->d_inode->i_mode)) {
-                                        // We cannot call open here as it would
-                                        // deadlock.
-                                        ptlrpc_req_finished(
-                                                       (struct ptlrpc_request *)
-                                                          it->d.lustre.it_data);
+                                       /* We cannot call open here as it might
+                                        * deadlock. This case is unreachable in
+                                        * practice because of
+                                        * OBD_CONNECT_NODEVOH. */
                                 } else {
                                        struct file *filp;