[v4,03/15] sysctl: add CTL_FLAGS_HAS to mark successful sysctl_op request

Submitted by Pavel Tikhomirov on April 21, 2016, 4:01 p.m.

Details

Message ID 1461254502-4997-1-git-send-email-ptikhomirov@virtuozzo.com
State Rejected
Series "net/ipv6: c/r dev/default/all conf ops"
Headers show

Patch hide | download patch | download mbox

diff --git a/criu/sysctl.c b/criu/sysctl.c
index 21ae4ce..d8fa04a 100644
--- a/criu/sysctl.c
+++ b/criu/sysctl.c
@@ -261,6 +261,9 @@  static int __userns_sysctl_op(void *arg, int proc_fd, pid_t pid)
 			goto out;
 		}
 
+		/* mark sysctl in question exists */
+		req->flags |= CTL_FLAGS_HAS;
+
 		/* save a pointer to the req, so we don't need to recompute its
 		 * location
 		 */
@@ -371,6 +374,9 @@  static int __nonuserns_sysctl_op(struct sysctl_req *req, size_t nr_req, int op)
 			goto out;
 		}
 
+		/* mark sysctl in question exists */
+		req->flags |= CTL_FLAGS_HAS;
+
 		ret = do_sysctl_op(fd, req, op);
 		if (ret)
 			goto out;