Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24970
b: refs/heads/master
c: a048d7a
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sesterhenn authored and Steve French committed Feb 21, 2006
1 parent 1c9a4f2 commit cd5d516
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e601ef22bc5ec9332c8d785533895ee81c834b8a
refs/heads/master: a048d7a8704b35ff6372fdf5eedd4533f37b1885
5 changes: 1 addition & 4 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,10 @@ cifs_read_super(struct super_block *sb, void *data,
int rc = 0;

sb->s_flags |= MS_NODIRATIME; /* and probably even noatime */
sb->s_fs_info = kmalloc(sizeof(struct cifs_sb_info),GFP_KERNEL);
sb->s_fs_info = kzalloc(sizeof(struct cifs_sb_info),GFP_KERNEL);
cifs_sb = CIFS_SB(sb);
if(cifs_sb == NULL)
return -ENOMEM;
else
memset(cifs_sb,0,sizeof(struct cifs_sb_info));


rc = cifs_mount(sb, cifs_sb, data, devname);

Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,10 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
CIFSSMBClose(xid, pTcon, fileHandle);
} else if(newinode) {
pCifsFile =
kmalloc(sizeof (struct cifsFileInfo), GFP_KERNEL);
kzalloc(sizeof (struct cifsFileInfo), GFP_KERNEL);

if(pCifsFile == NULL)
goto cifs_create_out;
memset((char *)pCifsFile, 0,
sizeof (struct cifsFileInfo));
pCifsFile->netfid = fileHandle;
pCifsFile->pid = current->tgid;
pCifsFile->pInode = newinode;
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
}
} else if (rc == -EACCES) {
/* try only if r/o attribute set in local lookup data? */
pinfo_buf = kmalloc(sizeof(FILE_BASIC_INFO), GFP_KERNEL);
pinfo_buf = kzalloc(sizeof(FILE_BASIC_INFO), GFP_KERNEL);
if (pinfo_buf) {
memset(pinfo_buf, 0, sizeof(FILE_BASIC_INFO));
/* ATTRS set to normal clears r/o bit */
pinfo_buf->Attributes = cpu_to_le32(ATTR_NORMAL);
if (!(pTcon->ses->flags & CIFS_SES_NT4))
Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/cifs/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ sesInfoAlloc(void)
struct cifsSesInfo *ret_buf;

ret_buf =
(struct cifsSesInfo *) kmalloc(sizeof (struct cifsSesInfo),
(struct cifsSesInfo *) kzalloc(sizeof (struct cifsSesInfo),
GFP_KERNEL);
if (ret_buf) {
memset(ret_buf, 0, sizeof (struct cifsSesInfo));
write_lock(&GlobalSMBSeslock);
atomic_inc(&sesInfoAllocCount);
ret_buf->status = CifsNew;
Expand Down Expand Up @@ -110,10 +109,9 @@ tconInfoAlloc(void)
{
struct cifsTconInfo *ret_buf;
ret_buf =
(struct cifsTconInfo *) kmalloc(sizeof (struct cifsTconInfo),
(struct cifsTconInfo *) kzalloc(sizeof (struct cifsTconInfo),
GFP_KERNEL);
if (ret_buf) {
memset(ret_buf, 0, sizeof (struct cifsTconInfo));
write_lock(&GlobalSMBSeslock);
atomic_inc(&tconInfoAllocCount);
list_add(&ret_buf->cifsConnectionList,
Expand Down

0 comments on commit cd5d516

Please sign in to comment.