diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2006-10-02 05:18:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:21 -0400 |
commit | e9ff3990f08e9a0c2839cc22808b01732ea5b3e4 (patch) | |
tree | c638a7b89f0c5e8adc410316d06ca1de8b8dabee /fs/lockd | |
parent | 0bdd7aab7f0ecd5d337910816aa058c18398628e (diff) |
[PATCH] namespaces: utsname: switch to using uts namespaces
Replace references to system_utsname to the per-process uts namespace
where appropriate. This includes things like uname.
Changes: Per Eric Biederman's comments, use the per-process uts namespace
for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c
[jdike@addtoit.com: UML fix]
[clg@fr.ibm.com: cleanup]
[akpm@osdl.org: build fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/clntproc.c | 4 | ||||
-rw-r--r-- | fs/lockd/mon.c | 2 | ||||
-rw-r--r-- | fs/lockd/svclock.c | 2 | ||||
-rw-r--r-- | fs/lockd/xdr.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 271e2165fff6..0116729cec5f 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c | |||
@@ -129,11 +129,11 @@ static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) | |||
129 | nlmclnt_next_cookie(&argp->cookie); | 129 | nlmclnt_next_cookie(&argp->cookie); |
130 | argp->state = nsm_local_state; | 130 | argp->state = nsm_local_state; |
131 | memcpy(&lock->fh, NFS_FH(fl->fl_file->f_dentry->d_inode), sizeof(struct nfs_fh)); | 131 | memcpy(&lock->fh, NFS_FH(fl->fl_file->f_dentry->d_inode), sizeof(struct nfs_fh)); |
132 | lock->caller = system_utsname.nodename; | 132 | lock->caller = utsname()->nodename; |
133 | lock->oh.data = req->a_owner; | 133 | lock->oh.data = req->a_owner; |
134 | lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s", | 134 | lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s", |
135 | (unsigned int)fl->fl_u.nfs_fl.owner->pid, | 135 | (unsigned int)fl->fl_u.nfs_fl.owner->pid, |
136 | system_utsname.nodename); | 136 | utsname()->nodename); |
137 | lock->svid = fl->fl_u.nfs_fl.owner->pid; | 137 | lock->svid = fl->fl_u.nfs_fl.owner->pid; |
138 | lock->fl.fl_start = fl->fl_start; | 138 | lock->fl.fl_start = fl->fl_start; |
139 | lock->fl.fl_end = fl->fl_end; | 139 | lock->fl.fl_end = fl->fl_end; |
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index 5954dcb497e4..a816b920d431 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c | |||
@@ -145,7 +145,7 @@ xdr_encode_common(struct rpc_rqst *rqstp, u32 *p, struct nsm_args *argp) | |||
145 | */ | 145 | */ |
146 | sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(argp->addr)); | 146 | sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(argp->addr)); |
147 | if (!(p = xdr_encode_string(p, buffer)) | 147 | if (!(p = xdr_encode_string(p, buffer)) |
148 | || !(p = xdr_encode_string(p, system_utsname.nodename))) | 148 | || !(p = xdr_encode_string(p, utsname()->nodename))) |
149 | return ERR_PTR(-EIO); | 149 | return ERR_PTR(-EIO); |
150 | *p++ = htonl(argp->prog); | 150 | *p++ = htonl(argp->prog); |
151 | *p++ = htonl(argp->vers); | 151 | *p++ = htonl(argp->vers); |
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index c9d419703cf3..93c00ee7189d 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -325,7 +325,7 @@ static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock) | |||
325 | { | 325 | { |
326 | locks_copy_lock(&call->a_args.lock.fl, &lock->fl); | 326 | locks_copy_lock(&call->a_args.lock.fl, &lock->fl); |
327 | memcpy(&call->a_args.lock.fh, &lock->fh, sizeof(call->a_args.lock.fh)); | 327 | memcpy(&call->a_args.lock.fh, &lock->fh, sizeof(call->a_args.lock.fh)); |
328 | call->a_args.lock.caller = system_utsname.nodename; | 328 | call->a_args.lock.caller = utsname()->nodename; |
329 | call->a_args.lock.oh.len = lock->oh.len; | 329 | call->a_args.lock.oh.len = lock->oh.len; |
330 | 330 | ||
331 | /* set default data area */ | 331 | /* set default data area */ |
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 033ea4ac2c30..61c46facf257 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c | |||
@@ -515,7 +515,7 @@ nlmclt_decode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp) | |||
515 | */ | 515 | */ |
516 | #define NLM_void_sz 0 | 516 | #define NLM_void_sz 0 |
517 | #define NLM_cookie_sz 1+XDR_QUADLEN(NLM_MAXCOOKIELEN) | 517 | #define NLM_cookie_sz 1+XDR_QUADLEN(NLM_MAXCOOKIELEN) |
518 | #define NLM_caller_sz 1+XDR_QUADLEN(sizeof(system_utsname.nodename)) | 518 | #define NLM_caller_sz 1+XDR_QUADLEN(sizeof(utsname()->nodename)) |
519 | #define NLM_netobj_sz 1+XDR_QUADLEN(XDR_MAX_NETOBJ) | 519 | #define NLM_netobj_sz 1+XDR_QUADLEN(XDR_MAX_NETOBJ) |
520 | /* #define NLM_owner_sz 1+XDR_QUADLEN(NLM_MAXOWNER) */ | 520 | /* #define NLM_owner_sz 1+XDR_QUADLEN(NLM_MAXOWNER) */ |
521 | #define NLM_fhandle_sz 1+XDR_QUADLEN(NFS2_FHSIZE) | 521 | #define NLM_fhandle_sz 1+XDR_QUADLEN(NFS2_FHSIZE) |