DESC
change tsk->pid/tgid references: fs/
DESC
Filesystem users...
--- linux-2.6.14-rc5-dave/fs/9p/debug.h | 4 ++-- linux-2.6.14-rc5-dave/fs/9p/fid.c | 5 +++-- linux-2.6.14-rc5-dave/fs/afs/cmservice.c | 2 +- linux-2.6.14-rc5-dave/fs/afs/kafsasyncd.c | 2 +- linux-2.6.14-rc5-dave/fs/afs/kafstimod.c | 2 +- linux-2.6.14-rc5-dave/fs/autofs/root.c | 2 +- linux-2.6.14-rc5-dave/fs/autofs4/autofs_i.h | 2 +- linux-2.6.14-rc5-dave/fs/autofs4/root.c | 2 +- linux-2.6.14-rc5-dave/fs/binfmt_elf.c | 8 ++++---- linux-2.6.14-rc5-dave/fs/binfmt_elf_fdpic.c | 2 +- linux-2.6.14-rc5-dave/fs/binfmt_flat.c | 2 +- linux-2.6.14-rc5-dave/fs/cifs/cifssmb.c | 2 +- linux-2.6.14-rc5-dave/fs/cifs/connect.c | 2 +- linux-2.6.14-rc5-dave/fs/cifs/dir.c | 2 +- linux-2.6.14-rc5-dave/fs/cifs/file.c | 4 ++-- linux-2.6.14-rc5-dave/fs/cifs/misc.c | 4 ++-- linux-2.6.14-rc5-dave/fs/cifs/transport.c | 2 +- linux-2.6.14-rc5-dave/fs/coda/upcall.c | 2 +- linux-2.6.14-rc5-dave/fs/compat.c | 2 +- linux-2.6.14-rc5-dave/fs/devfs/base.c | 2 +- linux-2.6.14-rc5-dave/fs/dnotify.c | 2 +- linux-2.6.14-rc5-dave/fs/exec.c | 8 ++++---- linux-2.6.14-rc5-dave/fs/ext2/inode.c | 2 +- linux-2.6.14-rc5-dave/fs/ext3/inode.c | 2 +- linux-2.6.14-rc5-dave/fs/fs-writeback.c | 2 +- linux-2.6.14-rc5-dave/fs/fuse/dev.c | 2 +- linux-2.6.14-rc5-dave/fs/jffs2/background.c | 2 +- linux-2.6.14-rc5-dave/fs/lockd/clntproc.c | 2 +- linux-2.6.14-rc5-dave/fs/lockd/svc.c | 6 +++--- linux-2.6.14-rc5-dave/fs/locks.c | 16 ++++++++-------- linux-2.6.14-rc5-dave/fs/nfs/callback.c | 2 +- linux-2.6.14-rc5-dave/fs/nfs/nfs3proc.c | 2 +- linux-2.6.14-rc5-dave/fs/nfs/nfs4proc.c | 2 +- linux-2.6.14-rc5-dave/fs/nfsd/nfs4state.c | 8 ++++---- linux-2.6.14-rc5-dave/fs/nfsd/vfs.c | 6 +++--- linux-2.6.14-rc5-dave/fs/proc/array.c | 12 +++++++----- linux-2.6.14-rc5-dave/fs/proc/base.c | 16 ++++++++-------- linux-2.6.14-rc5-dave/fs/smbfs/proc.c | 4 ++-- linux-2.6.14-rc5-dave/fs/smbfs/smbiod.c | 4 ++-- linux-2.6.14-rc5-dave/fs/xfs/linux-2.6/xfs_buf.c | 2 +- linux-2.6.14-rc5-dave/fs/xfs/linux-2.6/xfs_linux.h | 2 +- linux-2.6.14-rc5-dave/fs/xfs/support/debug.c | 2 +- 42 files changed, 82 insertions(+), 79 deletions(-) diff -puN fs/9p/debug.h~A1-change-pid-tgid-references-fs fs/9p/debug.h --- linux-2.6.14-rc5/fs/9p/debug.h~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/9p/debug.h 2005-10-24 17:55:14.000000000 +0200 @@ -39,13 +39,13 @@ extern int v9fs_debug_level; do { \ if((v9fs_debug_level & level)==level) \ printk(KERN_NOTICE "-- %s (%d): " \ - format , __FUNCTION__, current->pid , ## arg); \ + format , __FUNCTION__, get_kernel_pid(current) , ## arg); \ } while(0) #define eprintk(level, format, arg...) \ do { \ printk(level "v9fs: %s (%d): " \ - format , __FUNCTION__, current->pid , ## arg); \ + format , __FUNCTION__, get_kernel_pid(current) , ## arg); \ } while(0) #if DEBUG_DUMP_PKT diff -puN fs/9p/fid.c~A1-change-pid-tgid-references-fs fs/9p/fid.c --- linux-2.6.14-rc5/fs/9p/fid.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/9p/fid.c 2005-10-24 17:55:14.000000000 +0200 @@ -60,7 +60,7 @@ static int v9fs_fid_insert(struct v9fs_f } fid->uid = current->uid; - fid->pid = current->pid; + fid->pid = get_kernel_pid(current); list_add(&fid->list, fid_list); return 0; } @@ -242,7 +242,8 @@ struct v9fs_fid *v9fs_fid_get_created(st ret = NULL; if (fid_list) { list_for_each_entry_safe(fid, ftmp, fid_list, list) { - if (fid->fidcreate && fid->pid == current->pid) { + if (fid->fidcreate && fid->pid == + get_kernel_pid(current)) { list_del(&fid->list); ret = fid; break; diff -puN fs/afs/cmservice.c~A1-change-pid-tgid-references-fs fs/afs/cmservice.c --- linux-2.6.14-rc5/fs/afs/cmservice.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/afs/cmservice.c 2005-10-24 17:55:14.000000000 +0200 @@ -118,7 +118,7 @@ static int kafscmd(void *arg) _SRXAFSCM_xxxx_t func; int die; - printk("kAFS: Started kafscmd %d\n", current->pid); + printk("kAFS: Started kafscmd %d\n", get_kernel_pid(current)); daemonize("kafscmd"); diff -puN fs/afs/kafsasyncd.c~A1-change-pid-tgid-references-fs fs/afs/kafsasyncd.c --- linux-2.6.14-rc5/fs/afs/kafsasyncd.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/afs/kafsasyncd.c 2005-10-24 17:55:14.000000000 +0200 @@ -92,7 +92,7 @@ static int kafsasyncd(void *arg) kafsasyncd_task = current; - printk("kAFS: Started kafsasyncd %d\n", current->pid); + printk("kAFS: Started kafsasyncd %d\n", get_kernel_pid(current)); daemonize("kafsasyncd"); diff -puN fs/afs/kafstimod.c~A1-change-pid-tgid-references-fs fs/afs/kafstimod.c --- linux-2.6.14-rc5/fs/afs/kafstimod.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/afs/kafstimod.c 2005-10-24 17:55:14.000000000 +0200 @@ -69,7 +69,7 @@ static int kafstimod(void *arg) DECLARE_WAITQUEUE(myself, current); - printk("kAFS: Started kafstimod %d\n", current->pid); + printk("kAFS: Started kafstimod %d\n", get_kernel_pid(current)); daemonize("kafstimod"); diff -puN fs/autofs/root.c~A1-change-pid-tgid-references-fs fs/autofs/root.c --- linux-2.6.14-rc5/fs/autofs/root.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/autofs/root.c 2005-10-24 17:55:14.000000000 +0200 @@ -213,7 +213,7 @@ static struct dentry *autofs_root_lookup oz_mode = autofs_oz_mode(sbi); DPRINTK(("autofs_lookup: pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d\n", - current->pid, process_group(current), sbi->catatonic, oz_mode)); + get_kernel_pid(current), process_group(current), sbi->catatonic, oz_mode)); /* * Mark the dentry incomplete, but add it. This is needed so diff -puN fs/autofs4/autofs_i.h~A1-change-pid-tgid-references-fs fs/autofs4/autofs_i.h --- linux-2.6.14-rc5/fs/autofs4/autofs_i.h~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/autofs4/autofs_i.h 2005-10-24 17:55:14.000000000 +0200 @@ -33,7 +33,7 @@ /* #define DEBUG */ #ifdef DEBUG -#define DPRINTK(fmt,args...) do { printk(KERN_DEBUG "pid %d: %s: " fmt "\n" , current->pid , __FUNCTION__ , ##args); } while(0) +#define DPRINTK(fmt,args...) do { printk(KERN_DEBUG "pid %d: %s: " fmt "\n" , get_kernel_pid(current) , __FUNCTION__ , ##args); } while(0) #else #define DPRINTK(fmt,args...) do {} while(0) #endif diff -puN fs/autofs4/root.c~A1-change-pid-tgid-references-fs fs/autofs4/root.c --- linux-2.6.14-rc5/fs/autofs4/root.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/autofs4/root.c 2005-10-24 17:55:14.000000000 +0200 @@ -465,7 +465,7 @@ static struct dentry *autofs4_lookup(str oz_mode = autofs4_oz_mode(sbi); DPRINTK("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d", - current->pid, process_group(current), sbi->catatonic, oz_mode); + get_kernel_pid(current), process_group(current), sbi->catatonic, oz_mode); /* * Mark the dentry incomplete, but add it. This is needed so diff -puN fs/binfmt_elf.c~A1-change-pid-tgid-references-fs fs/binfmt_elf.c --- linux-2.6.14-rc5/fs/binfmt_elf.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/binfmt_elf.c 2005-10-24 17:55:14.000000000 +0200 @@ -1272,8 +1272,8 @@ static void fill_prstatus(struct elf_prs prstatus->pr_info.si_signo = prstatus->pr_cursig = signr; prstatus->pr_sigpend = p->pending.signal.sig[0]; prstatus->pr_sighold = p->blocked.sig[0]; - prstatus->pr_pid = p->pid; - prstatus->pr_ppid = p->parent->pid; + prstatus->pr_pid = get_kernel_pid(p); + prstatus->pr_ppid = get_kernel_pid(p->parent); prstatus->pr_pgrp = process_group(p); prstatus->pr_sid = p->signal->session; if (thread_group_leader(p)) { @@ -1318,8 +1318,8 @@ static int fill_psinfo(struct elf_prpsin psinfo->pr_psargs[i] = ' '; psinfo->pr_psargs[len] = 0; - psinfo->pr_pid = p->pid; - psinfo->pr_ppid = p->parent->pid; + psinfo->pr_pid = get_kernel_pid(p); + psinfo->pr_ppid = get_kernel_pid(p->parent); psinfo->pr_pgrp = process_group(p); psinfo->pr_sid = p->signal->session; diff -puN fs/binfmt_elf_fdpic.c~A1-change-pid-tgid-references-fs fs/binfmt_elf_fdpic.c --- linux-2.6.14-rc5/fs/binfmt_elf_fdpic.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/binfmt_elf_fdpic.c 2005-10-24 17:55:14.000000000 +0200 @@ -491,7 +491,7 @@ static int create_elf_fdpic_tables(struc * removed for 2.5 */ if (smp_num_siblings > 1) - sp = sp - ((current->pid % 64) << 7); + sp = sp - ((get_kernel_pid(current) % 64) << 7); #endif sp &= ~7UL; diff -puN fs/binfmt_flat.c~A1-change-pid-tgid-references-fs fs/binfmt_flat.c --- linux-2.6.14-rc5/fs/binfmt_flat.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/binfmt_flat.c 2005-10-24 17:55:14.000000000 +0200 @@ -95,7 +95,7 @@ static struct linux_binfmt flat_format = static int flat_core_dump(long signr, struct pt_regs * regs, struct file *file) { printk("Process %s:%d received signr %d and should have core dumped\n", - current->comm, current->pid, (int) signr); + current->comm, get_kernel_pid(current), (int) signr); return(1); } diff -puN fs/cifs/cifssmb.c~A1-change-pid-tgid-references-fs fs/cifs/cifssmb.c --- linux-2.6.14-rc5/fs/cifs/cifssmb.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/cifs/cifssmb.c 2005-10-24 17:55:15.000000000 +0200 @@ -1049,7 +1049,7 @@ CIFSSMBLock(const int xid, struct cifsTc pSMB->Fid = smb_file_id; /* netfid stays le */ if((numLock != 0) || (numUnlock != 0)) { - pSMB->Locks[0].Pid = cpu_to_le16(current->tgid); + pSMB->Locks[0].Pid = cpu_to_le16(get_kernel_tgid(current)); /* BB where to store pid high? */ pSMB->Locks[0].LengthLow = cpu_to_le32((u32)len); pSMB->Locks[0].LengthHigh = cpu_to_le32((u32)(len>>32)); diff -puN fs/cifs/connect.c~A1-change-pid-tgid-references-fs fs/cifs/connect.c --- linux-2.6.14-rc5/fs/cifs/connect.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/cifs/connect.c 2005-10-24 17:55:15.000000000 +0200 @@ -332,7 +332,7 @@ cifs_demultiplex_thread(struct TCP_Serve allow_signal(SIGKILL); current->flags |= PF_MEMALLOC; server->tsk = current; /* save process info to wake at shutdown */ - cFYI(1, ("Demultiplex PID: %d", current->pid)); + cFYI(1, ("Demultiplex PID: %d", get_kernel_pid(current))); write_lock(&GlobalSMBSeslock); atomic_inc(&tcpSesAllocCount); length = tcpSesAllocCount.counter; diff -puN fs/cifs/dir.c~A1-change-pid-tgid-references-fs fs/cifs/dir.c --- linux-2.6.14-rc5/fs/cifs/dir.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/cifs/dir.c 2005-10-24 17:55:15.000000000 +0200 @@ -243,7 +243,7 @@ cifs_create(struct inode *inode, struct memset((char *)pCifsFile, 0, sizeof (struct cifsFileInfo)); pCifsFile->netfid = fileHandle; - pCifsFile->pid = current->tgid; + pCifsFile->pid = get_kernel_tgid(current); pCifsFile->pInode = newinode; pCifsFile->invalidHandle = FALSE; pCifsFile->closePend = FALSE; diff -puN fs/cifs/file.c~A1-change-pid-tgid-references-fs fs/cifs/file.c --- linux-2.6.14-rc5/fs/cifs/file.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/cifs/file.c 2005-10-24 17:55:15.000000000 +0200 @@ -41,7 +41,7 @@ static inline struct cifsFileInfo *cifs_ { memset(private_data, 0, sizeof(struct cifsFileInfo)); private_data->netfid = netfid; - private_data->pid = current->tgid; + private_data->pid = get_kernel_tgid(current); init_MUTEX(&private_data->fh_sem); private_data->pfile = file; /* needed for writepage */ private_data->pInode = inode; @@ -173,7 +173,7 @@ int cifs_open(struct inode *inode, struc pCifsFile = list_entry(tmp, struct cifsFileInfo, flist); if ((pCifsFile->pfile == NULL) && - (pCifsFile->pid == current->tgid)) { + (pCifsFile->pid == get_kernel_tgid(current))) { /* mode set in cifs_create */ /* needed for writepage */ diff -puN fs/cifs/misc.c~A1-change-pid-tgid-references-fs fs/cifs/misc.c --- linux-2.6.14-rc5/fs/cifs/misc.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/cifs/misc.c 2005-10-24 17:55:15.000000000 +0200 @@ -242,8 +242,8 @@ header_assemble(struct smb_hdr *buffer, buffer->Command = smb_command; buffer->Flags = 0x00; /* case sensitive */ buffer->Flags2 = SMBFLG2_KNOWS_LONG_NAMES; - buffer->Pid = cpu_to_le16((__u16)current->tgid); - buffer->PidHigh = cpu_to_le16((__u16)(current->tgid >> 16)); + buffer->Pid = cpu_to_le16((__u16)get_kernel_tgid(current)); + buffer->PidHigh = cpu_to_le16((__u16)(get_kernel_tgid(current) >> 16)); spin_lock(&GlobalMid_Lock); GlobalMid++; buffer->Mid = GlobalMid; diff -puN fs/cifs/transport.c~A1-change-pid-tgid-references-fs fs/cifs/transport.c --- linux-2.6.14-rc5/fs/cifs/transport.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/cifs/transport.c 2005-10-24 17:55:15.000000000 +0200 @@ -55,7 +55,7 @@ AllocMidQEntry(struct smb_hdr *smb_buffe else { memset(temp, 0, sizeof (struct mid_q_entry)); temp->mid = smb_buffer->Mid; /* always LE */ - temp->pid = current->pid; + temp->pid = get_kernel_pid(current); temp->command = smb_buffer->Command; cFYI(1, ("For smb_command %d", temp->command)); do_gettimeofday(&temp->when_sent); diff -puN fs/coda/upcall.c~A1-change-pid-tgid-references-fs fs/coda/upcall.c --- linux-2.6.14-rc5/fs/coda/upcall.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/coda/upcall.c 2005-10-24 17:55:15.000000000 +0200 @@ -52,7 +52,7 @@ static void *alloc_upcall(int opcode, in return ERR_PTR(-ENOMEM); inp->ih.opcode = opcode; - inp->ih.pid = current->pid; + inp->ih.pid = get_kernel_pid(current); inp->ih.pgid = process_group(current); #ifdef CONFIG_CODA_FS_OLD_API memset(&inp->ih.cred, 0, sizeof(struct coda_cred)); diff -puN fs/compat.c~A1-change-pid-tgid-references-fs fs/compat.c --- linux-2.6.14-rc5/fs/compat.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/compat.c 2005-10-24 17:55:15.000000000 +0200 @@ -332,7 +332,7 @@ static void compat_ioctl_error(struct fi sprintf(buf, "%02x", buf[1]); printk("ioctl32(%s:%d): Unknown cmd fd(%d) " "cmd(%08x){%s} arg(%08x) on %s\n", - current->comm, current->pid, + current->comm, get_kernel_pid(current), (int)fd, (unsigned int)cmd, buf, (unsigned int)arg, fn); diff -puN fs/devfs/base.c~A1-change-pid-tgid-references-fs fs/devfs/base.c --- linux-2.6.14-rc5/fs/devfs/base.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/devfs/base.c 2005-10-24 17:55:15.000000000 +0200 @@ -2695,7 +2695,7 @@ static int devfsd_ioctl(struct inode *in spin_unlock(&lock); fs_info->devfsd_pgrp = (process_group(current) == - current->pid) ? process_group(current) : 0; + get_kernel_pid(current)) ? process_group(current) : 0; fs_info->devfsd_file = file; fs_info->devfsd_info = kmalloc(sizeof *fs_info->devfsd_info, GFP_KERNEL); diff -puN fs/dnotify.c~A1-change-pid-tgid-references-fs fs/dnotify.c --- linux-2.6.14-rc5/fs/dnotify.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/dnotify.c 2005-10-24 17:55:15.000000000 +0200 @@ -92,7 +92,7 @@ int fcntl_dirnotify(int fd, struct file prev = &odn->dn_next; } - error = f_setown(filp, current->pid, 0); + error = f_setown(filp, get_kernel_pid(current), 0); if (error) goto out_free; diff -puN fs/exec.c~A1-change-pid-tgid-references-fs fs/exec.c --- linux-2.6.14-rc5/fs/exec.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/exec.c 2005-10-24 17:55:15.000000000 +0200 @@ -686,8 +686,8 @@ static inline int de_thread(struct task_ proc_dentry2 = proc_pid_unhash(leader); write_lock_irq(&tasklist_lock); - BUG_ON(leader->tgid != current->tgid); - BUG_ON(current->pid == current->tgid); + BUG_ON(get_kernel_tgid(leader) != get_kernel_tgid(current)); + BUG_ON(get_kernel_pid(current) == get_kernel_tgid(current)); /* * An exec() starts a new thread group with the * TGID of the previous thread group. Rehash the @@ -1291,7 +1291,7 @@ static void format_corename(char *corena case 'p': pid_in_pattern = 1; rc = snprintf(out_ptr, out_end - out_ptr, - "%d", current->tgid); + "%d", get_kernel_tgid(current)); if (rc > out_end - out_ptr) goto out; out_ptr += rc; @@ -1363,7 +1363,7 @@ static void format_corename(char *corena if (!pid_in_pattern && (core_uses_pid || atomic_read(¤t->mm->mm_users) != 1)) { rc = snprintf(out_ptr, out_end - out_ptr, - ".%d", current->tgid); + ".%d", get_kernel_tgid(current)); if (rc > out_end - out_ptr) goto out; out_ptr += rc; diff -puN fs/ext2/inode.c~A1-change-pid-tgid-references-fs fs/ext2/inode.c --- linux-2.6.14-rc5/fs/ext2/inode.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/ext2/inode.c 2005-10-24 17:55:15.000000000 +0200 @@ -344,7 +344,7 @@ static unsigned long ext2_find_near(stru */ bg_start = (ei->i_block_group * EXT2_BLOCKS_PER_GROUP(inode->i_sb)) + le32_to_cpu(EXT2_SB(inode->i_sb)->s_es->s_first_data_block); - colour = (current->pid % 16) * + colour = (get_kernel_pid(current) % 16) * (EXT2_BLOCKS_PER_GROUP(inode->i_sb) / 16); return bg_start + colour; } diff -puN fs/ext3/inode.c~A1-change-pid-tgid-references-fs fs/ext3/inode.c --- linux-2.6.14-rc5/fs/ext3/inode.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/ext3/inode.c 2005-10-24 17:55:15.000000000 +0200 @@ -443,7 +443,7 @@ static unsigned long ext3_find_near(stru */ bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); - colour = (current->pid % 16) * + colour = (get_kernel_pid(current) % 16) * (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); return bg_start + colour; } diff -puN fs/fs-writeback.c~A1-change-pid-tgid-references-fs fs/fs-writeback.c --- linux-2.6.14-rc5/fs/fs-writeback.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:13.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/fs-writeback.c 2005-10-24 17:55:15.000000000 +0200 @@ -89,7 +89,7 @@ void __mark_inode_dirty(struct inode *in if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev")) printk(KERN_DEBUG "%s(%d): dirtied inode %lu (%s) on %s\n", - current->comm, current->pid, inode->i_ino, + current->comm, get_kernel_pid(current), inode->i_ino, name, inode->i_sb->s_id); } diff -puN fs/fuse/dev.c~A1-change-pid-tgid-references-fs fs/fuse/dev.c --- linux-2.6.14-rc5/fs/fuse/dev.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/fuse/dev.c 2005-10-24 17:55:15.000000000 +0200 @@ -99,7 +99,7 @@ static struct fuse_req *do_get_request(s req->preallocated = 1; req->in.h.uid = current->fsuid; req->in.h.gid = current->fsgid; - req->in.h.pid = current->pid; + req->in.h.pid = get_kernel_pid(current); return req; } diff -puN fs/jffs2/background.c~A1-change-pid-tgid-references-fs fs/jffs2/background.c --- linux-2.6.14-rc5/fs/jffs2/background.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/jffs2/background.c 2005-10-24 17:55:15.000000000 +0200 @@ -59,7 +59,7 @@ void jffs2_stop_garbage_collect_thread(s int wait = 0; spin_lock(&c->erase_completion_lock); if (c->gc_task) { - D1(printk(KERN_DEBUG "jffs2: Killing GC task %d\n", c->gc_task->pid)); + D1(printk(KERN_DEBUG "jffs2: Killing GC task %d\n", c->gc_get_kernel_pid(task))); send_sig(SIGKILL, c->gc_task, 1); wait = 1; } diff -puN fs/lockd/clntproc.c~A1-change-pid-tgid-references-fs fs/lockd/clntproc.c --- linux-2.6.14-rc5/fs/lockd/clntproc.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/lockd/clntproc.c 2005-10-24 17:55:15.000000000 +0200 @@ -131,7 +131,7 @@ static void nlmclnt_setlockargs(struct n lock->caller = system_utsname.nodename; lock->oh.data = req->a_owner; lock->oh.len = sprintf(req->a_owner, "%d@%s", - current->pid, system_utsname.nodename); + get_kernel_pid(current), system_utsname.nodename); locks_copy_lock(&lock->fl, fl); } diff -puN fs/lockd/svc.c~A1-change-pid-tgid-references-fs fs/lockd/svc.c --- linux-2.6.14-rc5/fs/lockd/svc.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/lockd/svc.c 2005-10-24 17:55:15.000000000 +0200 @@ -111,7 +111,7 @@ lockd(struct svc_rqst *rqstp) /* * Let our maker know we're running. */ - nlmsvc_pid = current->pid; + nlmsvc_pid = get_kernel_pid(current); up(&lockd_start); daemonize("lockd"); @@ -135,7 +135,7 @@ lockd(struct svc_rqst *rqstp) * NFS mount or NFS daemon has gone away, and we've been sent a * signal, or else another process has taken over our job. */ - while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) { + while ((nlmsvc_users || !signalled()) && nlmsvc_pid == get_kernel_pid(current)) { long timeout = MAX_SCHEDULE_TIMEOUT; if (signalled()) { @@ -182,7 +182,7 @@ lockd(struct svc_rqst *rqstp) * Check whether there's a new lockd process before * shutting down the hosts and clearing the slot. */ - if (!nlmsvc_pid || current->pid == nlmsvc_pid) { + if (!nlmsvc_pid || get_kernel_pid(current) == nlmsvc_pid) { if (nlmsvc_ops) nlmsvc_invalidate_all(); nlm_shutdown_hosts(); diff -puN fs/locks.c~A1-change-pid-tgid-references-fs fs/locks.c --- linux-2.6.14-rc5/fs/locks.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/locks.c 2005-10-24 17:55:15.000000000 +0200 @@ -268,7 +268,7 @@ static int flock_make_lock(struct file * return -ENOMEM; fl->fl_file = filp; - fl->fl_pid = current->tgid; + fl->fl_pid = get_kernel_tgid(current); fl->fl_flags = FL_FLOCK; fl->fl_type = type; fl->fl_end = OFFSET_MAX; @@ -333,7 +333,7 @@ static int flock_to_posix_lock(struct fi fl->fl_end = OFFSET_MAX; fl->fl_owner = current->files; - fl->fl_pid = current->tgid; + fl->fl_pid = get_kernel_tgid(current); fl->fl_file = filp; fl->fl_flags = FL_POSIX; fl->fl_ops = NULL; @@ -372,7 +372,7 @@ static int flock64_to_posix_lock(struct fl->fl_end = OFFSET_MAX; fl->fl_owner = current->files; - fl->fl_pid = current->tgid; + fl->fl_pid = get_kernel_tgid(current); fl->fl_file = filp; fl->fl_flags = FL_POSIX; fl->fl_ops = NULL; @@ -425,7 +425,7 @@ static struct lock_manager_operations le static int lease_init(struct file *filp, int type, struct file_lock *fl) { fl->fl_owner = current->files; - fl->fl_pid = current->tgid; + fl->fl_pid = get_kernel_tgid(current); fl->fl_file = filp; fl->fl_flags = FL_LEASE; @@ -1031,7 +1031,7 @@ int locks_mandatory_area(int read_write, locks_init_lock(&fl); fl.fl_owner = current->files; - fl.fl_pid = current->tgid; + fl.fl_pid = get_kernel_tgid(current); fl.fl_file = filp; fl.fl_flags = FL_POSIX | FL_ACCESS; if (filp && !(filp->f_flags & O_NONBLOCK)) @@ -1430,7 +1430,7 @@ int fcntl_setlease(unsigned int fd, stru goto out_unlock; } - error = f_setown(filp, current->pid, 0); + error = f_setown(filp, get_kernel_pid(current), 0); out_unlock: unlock_kernel(); return error; @@ -1849,7 +1849,7 @@ void locks_remove_posix(struct file *fil lock.fl_start = 0; lock.fl_end = OFFSET_MAX; lock.fl_owner = owner; - lock.fl_pid = current->tgid; + lock.fl_pid = get_kernel_tgid(current); lock.fl_file = filp; lock.fl_ops = NULL; lock.fl_lmops = NULL; @@ -1893,7 +1893,7 @@ void locks_remove_flock(struct file *fil if (filp->f_op && filp->f_op->flock) { struct file_lock fl = { - .fl_pid = current->tgid, + .fl_pid = get_kernel_tgid(current), .fl_file = filp, .fl_flags = FL_FLOCK, .fl_type = F_UNLCK, diff -puN fs/nfs/callback.c~A1-change-pid-tgid-references-fs fs/nfs/callback.c --- linux-2.6.14-rc5/fs/nfs/callback.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/nfs/callback.c 2005-10-24 17:55:15.000000000 +0200 @@ -44,7 +44,7 @@ static void nfs_callback_svc(struct svc_ __module_get(THIS_MODULE); lock_kernel(); - nfs_callback_info.pid = current->pid; + nfs_callback_info.pid = get_kernel_pid(current); daemonize("nfsv4-svc"); /* Process request with signals blocked, but allow SIGKILL. */ allow_signal(SIGKILL); diff -puN fs/nfs/nfs3proc.c~A1-change-pid-tgid-references-fs fs/nfs/nfs3proc.c --- linux-2.6.14-rc5/fs/nfs/nfs3proc.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/nfs/nfs3proc.c 2005-10-24 17:55:15.000000000 +0200 @@ -323,7 +323,7 @@ nfs3_proc_create(struct inode *dir, stru if (flags & O_EXCL) { arg.createmode = NFS3_CREATE_EXCLUSIVE; arg.verifier[0] = jiffies; - arg.verifier[1] = current->pid; + arg.verifier[1] = get_kernel_pid(current); } sattr->ia_mode &= ~current->fs->umask; diff -puN fs/nfs/nfs4proc.c~A1-change-pid-tgid-references-fs fs/nfs/nfs4proc.c --- linux-2.6.14-rc5/fs/nfs/nfs4proc.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/nfs/nfs4proc.c 2005-10-24 17:55:15.000000000 +0200 @@ -661,7 +661,7 @@ static int _nfs4_do_open(struct inode *d if (flags & O_EXCL) { u32 *p = (u32 *) o_arg.u.verifier.data; p[0] = jiffies; - p[1] = current->pid; + p[1] = get_kernel_pid(current); } else o_arg.u.attrs = sattr; /* Serialization for the sequence id */ diff -puN fs/nfsd/nfs4state.c~A1-change-pid-tgid-references-fs fs/nfsd/nfs4state.c --- linux-2.6.14-rc5/fs/nfsd/nfs4state.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/nfsd/nfs4state.c 2005-10-24 17:55:15.000000000 +0200 @@ -1740,7 +1740,7 @@ nfs4_open_delegation(struct svc_fh *fh, fl.fl_end = OFFSET_MAX; fl.fl_owner = (fl_owner_t)dp; fl.fl_file = stp->st_vfs_file; - fl.fl_pid = current->tgid; + fl.fl_pid = get_kernel_tgid(current); /* setlease checks to see if delegation should be handed out. * the lock_manager callbacks fl_mylease and fl_change are used @@ -2784,7 +2784,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struc goto out; } file_lock.fl_owner = (fl_owner_t)lock_sop; - file_lock.fl_pid = current->tgid; + file_lock.fl_pid = get_kernel_tgid(current); file_lock.fl_file = filp; file_lock.fl_flags = FL_POSIX; @@ -2903,7 +2903,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru &lockt->lt_clientid, &lockt->lt_owner); if (lockt->lt_stateowner) file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner; - file_lock.fl_pid = current->tgid; + file_lock.fl_pid = get_kernel_tgid(current); file_lock.fl_flags = FL_POSIX; file_lock.fl_start = lockt->lt_offset; @@ -2962,7 +2962,7 @@ nfsd4_locku(struct svc_rqst *rqstp, stru locks_init_lock(&file_lock); file_lock.fl_type = F_UNLCK; file_lock.fl_owner = (fl_owner_t) locku->lu_stateowner; - file_lock.fl_pid = current->tgid; + file_lock.fl_pid = get_kernel_tgid(current); file_lock.fl_file = filp; file_lock.fl_flags = FL_POSIX; file_lock.fl_start = locku->lu_offset; diff -puN fs/nfsd/vfs.c~A1-change-pid-tgid-references-fs fs/nfsd/vfs.c --- linux-2.6.14-rc5/fs/nfsd/vfs.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/nfsd/vfs.c 2005-10-24 17:55:15.000000000 +0200 @@ -948,13 +948,13 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s if (EX_WGATHER(exp)) { if (atomic_read(&inode->i_writecount) > 1 || (last_ino == inode->i_ino && last_dev == inode->i_sb->s_dev)) { - dprintk("nfsd: write defer %d\n", current->pid); + dprintk("nfsd: write defer %d\n", get_kernel_pid(current)); msleep(10); - dprintk("nfsd: write resume %d\n", current->pid); + dprintk("nfsd: write resume %d\n", get_kernel_pid(current)); } if (inode->i_state & I_DIRTY) { - dprintk("nfsd: write sync %d\n", current->pid); + dprintk("nfsd: write sync %d\n", get_kernel_pid(current)); nfsd_sync(file); } #if 0 diff -puN fs/proc/array.c~A1-change-pid-tgid-references-fs fs/proc/array.c --- linux-2.6.14-rc5/fs/proc/array.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/proc/array.c 2005-10-24 17:55:15.000000000 +0200 @@ -174,9 +174,10 @@ static inline char * task_state(struct t "Gid:\t%d\t%d\t%d\t%d\n", get_task_state(p), (p->sleep_avg/1024)*100/(1020000000/1024), - p->tgid, - p->pid, pid_alive(p) ? p->group_leader->real_parent->tgid : 0, - pid_alive(p) && p->ptrace ? p->parent->pid : 0, + get_kernel_tgid(p), + get_kernel_pid(p), pid_alive(p) ? + get_kernel_tgid(p->group_leader->real_parent) : 0, + pid_alive(p) && p->ptrace ? get_kernel_pid(p->parent) : 0, p->uid, p->euid, p->suid, p->fsuid, p->gid, p->egid, p->sgid, p->fsgid); read_unlock(&tasklist_lock); @@ -388,7 +389,8 @@ static int do_task_stat(struct task_stru } it_real_value = task->signal->it_real_value; } - ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0; + ppid = pid_alive(task) ? + get_kernel_tgid(task->group_leader->real_parent) : 0; read_unlock(&tasklist_lock); if (!whole || num_threads<2) @@ -415,7 +417,7 @@ static int do_task_stat(struct task_stru res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \ %lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \ %lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n", - task->pid, + get_kernel_pid(task), tcomm, state, ppid, diff -puN fs/proc/base.c~A1-change-pid-tgid-references-fs fs/proc/base.c --- linux-2.6.14-rc5/fs/proc/base.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/proc/base.c 2005-10-24 17:55:15.000000000 +0200 @@ -1128,7 +1128,7 @@ static int proc_readfd(struct file * fil if (!pid_alive(p)) goto out; retval = 0; - tid = p->pid; + tid = get_kernel_pid(p); fd = filp->f_pos; switch (fd) { @@ -1195,7 +1195,7 @@ static int proc_pident_readdir(struct fi goto out; ret = 0; - pid = proc_task(inode)->pid; + pid = get_kernel_pid(proc_task(inode)); i = filp->f_pos; switch (i) { case 0: @@ -1280,7 +1280,7 @@ static struct inode *proc_pid_make_inode ei = PROC_I(inode); ei->task = NULL; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; - inode->i_ino = fake_ino(task->pid, ino); + inode->i_ino = fake_ino(get_kernel_pid(task), ino); if (!pid_alive(task)) goto out_unlock; @@ -1846,14 +1846,14 @@ static int proc_self_readlink(struct den int buflen) { char tmp[30]; - sprintf(tmp, "%d", current->tgid); + sprintf(tmp, "%d", get_kernel_tgid(current)); return vfs_readlink(dentry,buffer,buflen,tmp); } static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) { char tmp[30]; - sprintf(tmp, "%d", current->tgid); + sprintf(tmp, "%d", get_kernel_tgid(current)); return ERR_PTR(vfs_follow_link(nd,tmp)); } @@ -2010,7 +2010,7 @@ static struct dentry *proc_task_lookup(s read_unlock(&tasklist_lock); if (!task) goto out; - if (leader->tgid != task->tgid) + if (get_kernel_tgid(leader) != get_kernel_tgid(task)) goto out_drop_task; inode = proc_pid_make_inode(dir->i_sb, task, PROC_TID_INO); @@ -2068,7 +2068,7 @@ static int get_tgid_list(int index, unsi p = next_task(&init_task); for ( ; p != &init_task; p = next_task(p)) { - int tgid = p->pid; + int tgid = get_kernel_pid(p); if (!pid_alive(p)) continue; if (--index >= 0) @@ -2101,7 +2101,7 @@ static int get_tid_list(int index, unsig * via next_thread(). */ if (pid_alive(task)) do { - int tid = task->pid; + int tid = get_kernel_pid(task); if (--index >= 0) continue; diff -puN fs/smbfs/proc.c~A1-change-pid-tgid-references-fs fs/smbfs/proc.c --- linux-2.6.14-rc5/fs/smbfs/proc.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/smbfs/proc.c 2005-10-24 17:55:15.000000000 +0200 @@ -852,7 +852,7 @@ smb_newconn(struct smb_sb_info *server, struct sock *sk; int error; - VERBOSE("fd=%d, pid=%d\n", opt->fd, current->pid); + VERBOSE("fd=%d, pid=%d\n", opt->fd, get_kernel_pid(current)); smb_lock_server(server); @@ -876,7 +876,7 @@ smb_newconn(struct smb_sb_info *server, goto out_putf; server->sock_file = filp; - server->conn_pid = current->pid; + server->conn_pid = get_kernel_pid(current); server->opt = *opt; server->generation += 1; server->state = CONN_VALID; diff -puN fs/smbfs/smbiod.c~A1-change-pid-tgid-references-fs fs/smbfs/smbiod.c --- linux-2.6.14-rc5/fs/smbfs/smbiod.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/smbfs/smbiod.c 2005-10-24 17:55:15.000000000 +0200 @@ -294,7 +294,7 @@ static int smbiod(void *unused) allow_signal(SIGKILL); - VERBOSE("SMB Kernel thread starting (%d) ...\n", current->pid); + VERBOSE("SMB Kernel thread starting (%d) ...\n", get_kernel_pid(current)); for (;;) { struct smb_sb_info *server; @@ -336,6 +336,6 @@ static int smbiod(void *unused) spin_unlock(&servers_lock); } - VERBOSE("SMB Kernel thread exiting (%d) ...\n", current->pid); + VERBOSE("SMB Kernel thread exiting (%d) ...\n", get_kernel_pid(current)); module_put_and_exit(0); } diff -puN fs/xfs/linux-2.6/xfs_buf.c~A1-change-pid-tgid-references-fs fs/xfs/linux-2.6/xfs_buf.c --- linux-2.6.14-rc5/fs/xfs/linux-2.6/xfs_buf.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/xfs/linux-2.6/xfs_buf.c 2005-10-24 17:55:15.000000000 +0200 @@ -103,7 +103,7 @@ ktrace_t *pagebuf_trace_buf; #endif #ifdef PAGEBUF_LOCK_TRACKING -# define PB_SET_OWNER(pb) ((pb)->pb_last_holder = current->pid) +# define PB_SET_OWNER(pb) ((pb)->pb_last_holder = get_kernel_pid(current)) # define PB_CLEAR_OWNER(pb) ((pb)->pb_last_holder = -1) # define PB_GET_OWNER(pb) ((pb)->pb_last_holder) #else diff -puN fs/xfs/linux-2.6/xfs_linux.h~A1-change-pid-tgid-references-fs fs/xfs/linux-2.6/xfs_linux.h --- linux-2.6.14-rc5/fs/xfs/linux-2.6/xfs_linux.h~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/xfs/linux-2.6/xfs_linux.h 2005-10-24 17:55:15.000000000 +0200 @@ -149,7 +149,7 @@ static inline void set_buffer_unwritten_ #define raw_smp_processor_id() smp_processor_id() #endif #define current_cpu() raw_smp_processor_id() -#define current_pid() (current->pid) +#define current_pid() (get_kernel_pid(current)) #define current_fsuid(cred) (current->fsuid) #define current_fsgid(cred) (current->fsgid) diff -puN fs/xfs/support/debug.c~A1-change-pid-tgid-references-fs fs/xfs/support/debug.c --- linux-2.6.14-rc5/fs/xfs/support/debug.c~A1-change-pid-tgid-references-fs 2005-10-24 17:55:14.000000000 +0200 +++ linux-2.6.14-rc5-dave/fs/xfs/support/debug.c 2005-10-24 17:55:15.000000000 +0200 @@ -76,7 +76,7 @@ random(void) int get_thread_id(void) { - return current->pid; + return get_kernel_pid(current); } #endif /* DEBUG || INDUCE_IO_ERRROR || !NO_WANT_RANDOM */ _ _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserverReceived on Mon Oct 24 17:30:07 2005