Commit 486a567d authored by Steve French's avatar Steve French

Match smb pid to current->tgid

parent 41b2f9da
/* /*
* fs/cifs/cifssmb.c * fs/cifs/cifssmb.c
* *
* Copyright (c) International Business Machines Corp., 2002 * Copyright (C) International Business Machines Corp., 2002,2003
* Author(s): Steve French (sfrench@us.ibm.com) * Author(s): Steve French (sfrench@us.ibm.com)
* *
* Contains the routines for constructing the SMB PDUs themselves * Contains the routines for constructing the SMB PDUs themselves
...@@ -656,7 +656,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, ...@@ -656,7 +656,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
pSMB->AndXCommand = 0xFF; /* none */ pSMB->AndXCommand = 0xFF; /* none */
pSMB->Fid = smb_file_id; /* netfid stays le */ pSMB->Fid = smb_file_id; /* netfid stays le */
pSMB->Locks[0].Pid = cpu_to_le16(current->pid); pSMB->Locks[0].Pid = cpu_to_le16(current->tgid);
pSMB->Locks[0].Length = cpu_to_le64(len); pSMB->Locks[0].Length = cpu_to_le64(len);
pSMB->Locks[0].Offset = cpu_to_le64(offset); pSMB->Locks[0].Offset = cpu_to_le64(offset);
pSMB->ByteCount = sizeof (LOCKING_ANDX_RANGE); pSMB->ByteCount = sizeof (LOCKING_ANDX_RANGE);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* vfs operations that deal with dentries * vfs operations that deal with dentries
* *
* Copyright (c) International Business Machines Corp., 2002 * Copyright (C) International Business Machines Corp., 2002,2003
* Author(s): Steve French (sfrench@us.ibm.com) * Author(s): Steve French (sfrench@us.ibm.com)
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
...@@ -216,7 +216,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, ...@@ -216,7 +216,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
memset((char *)pCifsFile, 0, memset((char *)pCifsFile, 0,
sizeof (struct cifsFileInfo)); sizeof (struct cifsFileInfo));
pCifsFile->netfid = fileHandle; pCifsFile->netfid = fileHandle;
pCifsFile->pid = current->pid; pCifsFile->pid = current->tgid;
pCifsFile->pInode = newinode; pCifsFile->pInode = newinode;
/* pCifsFile->pfile = file; */ /* put in at open time */ /* pCifsFile->pfile = file; */ /* put in at open time */
write_lock(&GlobalSMBSeslock); write_lock(&GlobalSMBSeslock);
......
/* /*
* fs/cifs/inode.c * fs/cifs/inode.c
* *
* Copyright (c) International Business Machines Corp., 2002 * Copyright (C) International Business Machines Corp., 2002,2003
* Author(s): Steve French (sfrench@us.ibm.com) * Author(s): Steve French (sfrench@us.ibm.com)
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
...@@ -345,6 +345,8 @@ cifs_unlink(struct inode *inode, struct dentry *direntry) ...@@ -345,6 +345,8 @@ cifs_unlink(struct inode *inode, struct dentry *direntry)
if (!rc) { if (!rc) {
direntry->d_inode->i_nlink--; direntry->d_inode->i_nlink--;
} else if (rc == -ENOENT) {
d_drop(direntry);
} else if (rc == -ETXTBSY) { } else if (rc == -ETXTBSY) {
int oplock = FALSE; int oplock = FALSE;
__u16 netfid; __u16 netfid;
......
/* /*
* fs/cifs/misc.c * fs/cifs/misc.c
* *
* Copyright (c) International Business Machines Corp., 2002 * Copyright (c) International Business Machines Corp., 2002,2003
* Author(s): Steve French (sfrench@us.ibm.com) * Author(s): Steve French (sfrench@us.ibm.com)
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
...@@ -213,7 +213,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , ...@@ -213,7 +213,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
buffer->Command = smb_command; buffer->Command = smb_command;
buffer->Flags = 0x00; /* case sensitive */ buffer->Flags = 0x00; /* case sensitive */
buffer->Flags2 = SMBFLG2_KNOWS_LONG_NAMES; buffer->Flags2 = SMBFLG2_KNOWS_LONG_NAMES;
tmp = cpu_to_le32(current->pid); tmp = cpu_to_le32(current->tgid);
buffer->Pid = tmp & 0xFFFF; buffer->Pid = tmp & 0xFFFF;
tmp >>= 16; tmp >>= 16;
buffer->PidHigh = tmp & 0xFFFF; buffer->PidHigh = tmp & 0xFFFF;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment