[Devel] [PATCH] e4defrag2: Check fs-cross before call scan_fn handler

Dmitry Monakhov dmonakhov at openvz.org
Fri Apr 8 00:17:05 PDT 2016


https://jira.sw.ru/browse/PSBM-45214

Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 misc/e4defrag2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/misc/e4defrag2.c b/misc/e4defrag2.c
index 0643fa4..8ecae16 100644
--- a/misc/e4defrag2.c
+++ b/misc/e4defrag2.c
@@ -1249,6 +1249,8 @@ static int scan_one_dentry(struct defrag_context *dfx, int dirfd,
 		goto out;
 	if (stat.st_blocks == 0)
 		goto out;
+	if (stat.st_dev != dfx->root_st.st_dev)
+		goto out;
 
 	/* Access authority */
 	if (current_uid != ROOT_UID &&
-- 
1.7.1



More information about the Devel mailing list