Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190956
b: refs/heads/master
c: fae683f
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Jayaraman authored and Steve French committed May 10, 2010
1 parent 3d22d65 commit 2090b9c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 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: 51c8176472de1551a301b676e36a61884e0e8494
refs/heads/master: fae683f764f91f31ab45512e70cc8cc81d4d157b
18 changes: 16 additions & 2 deletions trunk/fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ build_path_from_dentry(struct dentry *direntry)
return full_path;
}

/*
* When called with struct file pointer set to NULL, there is no way we could
* update file->private_data, but getting it stuck on openFileList provides a
* way to access it from cifs_fill_filedata and thereby set file->private_data
* from cifs_open.
*/
struct cifsFileInfo *
cifs_new_fileinfo(struct inode *newinode, __u16 fileHandle,
struct file *file, struct vfsmount *mnt, unsigned int oflags)
Expand Down Expand Up @@ -251,6 +257,10 @@ int cifs_posix_open(char *full_path, struct inode **pinode,
cifs_fattr_to_inode(*pinode, &fattr);
}

/*
* cifs_fill_filedata() takes care of setting cifsFileInfo pointer to
* file->private_data.
*/
if (mnt)
cifs_new_fileinfo(*pinode, *pnetfid, NULL, mnt, oflags);

Expand Down Expand Up @@ -466,8 +476,12 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
/* mknod case - do not leave file open */
CIFSSMBClose(xid, tcon, fileHandle);
} else if (!(posix_create) && (newinode)) {
cifs_new_fileinfo(newinode, fileHandle, NULL,
nd->path.mnt, oflags);
/*
* cifs_fill_filedata() takes care of setting cifsFileInfo
* pointer to file->private_data.
*/
cifs_new_fileinfo(newinode, fileHandle, NULL, nd->path.mnt,
oflags);
}
cifs_create_out:
kfree(buf);
Expand Down

0 comments on commit 2090b9c

Please sign in to comment.