Subject: [PATCH] pspace: Fixup the nfs lock client to handle > 32bit pids. From: Eric W. Biederman Date: 1134930540 -0700 --- fs/lockd/clntproc.c | 2 +- include/linux/lockd/lockd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 26fb8e14f1f338b260929eacce946b9450b08df1 diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 2e3627d..150a720 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -130,7 +130,7 @@ static void nlmclnt_setlockargs(struct n memcpy(&lock->fh, NFS_FH(fl->fl_file->f_dentry->d_inode), sizeof(struct nfs_fh)); lock->caller = current->host->utsname.nodename; lock->oh.data = req->a_owner; - lock->oh.len = sprintf(req->a_owner, "%u@%s", + lock->oh.len = sprintf(req->a_owner, "%lu@%s", pid_nr(current, PIDTYPE_TID), current->host->utsname.nodename); locks_copy_lock(&lock->fl, fl); diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index c988c26..31fa983 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -78,7 +78,7 @@ struct nlm_wait; /* * Memory chunk for NLM client RPC request. */ -#define NLMCLNT_OHSIZE (sizeof(current->host->utsname.nodename)+10) +#define NLMCLNT_OHSIZE (sizeof(current->host->utsname.nodename)+((BITS_PER_LONG <=32)?10:20)) struct nlm_rqst { unsigned int a_flags; /* initial RPC task flags */ struct nlm_host * a_host; /* host handle */ -- 1.0.GIT