You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/10/13 05:55:43 UTC
mesos git commit: Removed two std::move in MountInfoTable::read.
Repository: mesos
Updated Branches:
refs/heads/master 78f1ea321 -> 89ffe695c
Removed two std::move in MountInfoTable::read.
Review: https://reviews.apache.org/r/51620/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/89ffe695
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/89ffe695
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/89ffe695
Branch: refs/heads/master
Commit: 89ffe695c5b885ed59374db90cd5fe0f87ba8239
Parents: 78f1ea3
Author: Jie Yu <yu...@gmail.com>
Authored: Wed Oct 12 22:49:45 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Oct 12 22:50:00 2016 -0700
----------------------------------------------------------------------
src/linux/fs.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/89ffe695/src/linux/fs.cpp
----------------------------------------------------------------------
diff --git a/src/linux/fs.cpp b/src/linux/fs.cpp
index f184d46..913e233 100644
--- a/src/linux/fs.cpp
+++ b/src/linux/fs.cpp
@@ -116,7 +116,7 @@ Try<MountInfoTable> MountInfoTable::read(
CHECK_NONE(rootParentId);
rootParentId = entry.parent;
}
- parentToChildren[entry.parent].push_back(std::move(entry));
+ parentToChildren[entry.parent].push_back(entry);
}
// Walk the hashmap and construct a list of entries sorted
@@ -134,8 +134,7 @@ Try<MountInfoTable> MountInfoTable::read(
visitedParents.insert(parentId);
foreach (const MountInfoTable::Entry& entry, parentToChildren[parentId]) {
- int newParentId = entry.id;
- sortedEntries.push_back(std::move(entry));
+ sortedEntries.push_back(entry);
// It is legal to have a `MountInfoTable` entry whose
// `entry.id` is the same as its `entry.parent`. This can
@@ -143,8 +142,8 @@ Try<MountInfoTable> MountInfoTable::read(
// and then keeps the original `/` in RAM. To avoid cycles
// when walking the mount hierarchy, we only recurse into our
// children if this case is not satisfied.
- if (parentId != newParentId) {
- sortFrom(newParentId);
+ if (parentId != entry.id) {
+ sortFrom(entry.id);
}
}
};