Thread (65 messages) 65 messages, 9 authors, 2019-06-17

Re: [PATCH 3/7] vfs: Add a mount-notification facility

From: David Howells <dhowells@redhat.com>
Date: 2019-05-29 10:55:21
Also in: keyrings, linux-block, linux-fsdevel, linux-security-module, lkml

Jann Horn [off-list ref] wrote:
quoted
+                       /* Global root? */
+                       if (mnt != parent) {
+                               cursor.dentry = READ_ONCE(mnt->mnt_mountpoint);
+                               mnt = parent;
+                               cursor.mnt = &mnt->mnt;
+                               continue;
+                       }
+                       break;
(nit: this would look clearer if you inverted the condition and wrote
it as "if (mnt == parent) break;", then you also wouldn't need that
"continue" or the braces)
It does look better with the logic inverted, but you *do* still need the
continue.  After the if-statement, there is:

	cursor.dentry = cursor.dentry->d_parent;

which we need to skip.  It might make sense to move that into an
else-statement from an aesthetic point of view.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help