diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-18 16:20:26 -0700 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 21:46:26 -0500 |
commit | fb1214e48f735cdb68446adb77ec37aa3de60697 (patch) | |
tree | 158dbfbedaf396f013e70f5288fdc906e990391c /fs/cifs/dir.c | |
parent | 4b4de76e35518fc0c636f628abca8c1b19ad6689 (diff) |
CIFS: Move open code to ops struct
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 781025be48bc..70823dc4f960 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -377,11 +377,12 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, unsigned int xid; struct tcon_link *tlink; struct cifs_tcon *tcon; - __u16 fileHandle; + struct cifs_fid fid; __u32 oplock; - struct cifsFileInfo *pfile_info; + struct cifsFileInfo *file_info; - /* Posix open is only called (at lookup time) for file create now. For + /* + * Posix open is only called (at lookup time) for file create now. For * opens (rather than creates), because we do not know if it is a file * or directory yet, and current Samba no longer allows us to do posix * open on dirs, we could end up wasting an open call on what turns out @@ -415,20 +416,20 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, tcon = tlink_tcon(tlink); rc = cifs_do_create(inode, direntry, xid, tlink, oflags, mode, - &oplock, &fileHandle, opened); + &oplock, &fid.netfid, opened); if (rc) goto out; rc = finish_open(file, direntry, generic_file_open, opened); if (rc) { - CIFSSMBClose(xid, tcon, fileHandle); + CIFSSMBClose(xid, tcon, fid.netfid); goto out; } - pfile_info = cifs_new_fileinfo(fileHandle, file, tlink, oplock); - if (pfile_info == NULL) { - CIFSSMBClose(xid, tcon, fileHandle); + file_info = cifs_new_fileinfo(&fid, file, tlink, oplock); + if (file_info == NULL) { + CIFSSMBClose(xid, tcon, fid.netfid); rc = -ENOMEM; } |