diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-18 19:20:26 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 22:46:26 -0400 |
commit | 4b4de76e35518fc0c636f628abca8c1b19ad6689 (patch) | |
tree | 18b27673849d55235c216f0cbb811e1aa4b87ae9 /fs/cifs/inode.c | |
parent | cbe6f439f5762c7fb4d2dd9293f5fdbfc4cd68f8 (diff) |
CIFS: Replace netfid with cifs_fid struct in cifsFileInfo
This is help us to extend the code for future protocols that can use
another fid mechanism (as SMB2 that has it divided into two parts:
persistent and violatile).
Also rename variables and refactor the code around the changes.
Reviewed-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index bb39ea475a20..ea7428a82a31 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -294,7 +294,7 @@ int cifs_get_file_info_unix(struct file *filp) | |||
294 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); | 294 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); |
295 | 295 | ||
296 | xid = get_xid(); | 296 | xid = get_xid(); |
297 | rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data); | 297 | rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->fid.netfid, &find_data); |
298 | if (!rc) { | 298 | if (!rc) { |
299 | cifs_unix_basic_to_fattr(&fattr, &find_data, cifs_sb); | 299 | cifs_unix_basic_to_fattr(&fattr, &find_data, cifs_sb); |
300 | } else if (rc == -EREMOTE) { | 300 | } else if (rc == -EREMOTE) { |
@@ -562,7 +562,7 @@ int cifs_get_file_info(struct file *filp) | |||
562 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); | 562 | struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); |
563 | 563 | ||
564 | xid = get_xid(); | 564 | xid = get_xid(); |
565 | rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data); | 565 | rc = CIFSSMBQFileInfo(xid, tcon, cfile->fid.netfid, &find_data); |
566 | switch (rc) { | 566 | switch (rc) { |
567 | case 0: | 567 | case 0: |
568 | cifs_all_info_to_fattr(&fattr, &find_data, cifs_sb, false); | 568 | cifs_all_info_to_fattr(&fattr, &find_data, cifs_sb, false); |
@@ -930,7 +930,7 @@ cifs_set_file_info(struct inode *inode, struct iattr *attrs, unsigned int xid, | |||
930 | */ | 930 | */ |
931 | open_file = find_writable_file(cifsInode, true); | 931 | open_file = find_writable_file(cifsInode, true); |
932 | if (open_file) { | 932 | if (open_file) { |
933 | netfid = open_file->netfid; | 933 | netfid = open_file->fid.netfid; |
934 | netpid = open_file->pid; | 934 | netpid = open_file->pid; |
935 | pTcon = tlink_tcon(open_file->tlink); | 935 | pTcon = tlink_tcon(open_file->tlink); |
936 | goto set_via_filehandle; | 936 | goto set_via_filehandle; |
@@ -1887,7 +1887,7 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs, | |||
1887 | */ | 1887 | */ |
1888 | open_file = find_writable_file(cifsInode, true); | 1888 | open_file = find_writable_file(cifsInode, true); |
1889 | if (open_file) { | 1889 | if (open_file) { |
1890 | __u16 nfid = open_file->netfid; | 1890 | __u16 nfid = open_file->fid.netfid; |
1891 | __u32 npid = open_file->pid; | 1891 | __u32 npid = open_file->pid; |
1892 | pTcon = tlink_tcon(open_file->tlink); | 1892 | pTcon = tlink_tcon(open_file->tlink); |
1893 | rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size, nfid, | 1893 | rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size, nfid, |
@@ -2061,7 +2061,7 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs) | |||
2061 | args->device = 0; | 2061 | args->device = 0; |
2062 | open_file = find_writable_file(cifsInode, true); | 2062 | open_file = find_writable_file(cifsInode, true); |
2063 | if (open_file) { | 2063 | if (open_file) { |
2064 | u16 nfid = open_file->netfid; | 2064 | u16 nfid = open_file->fid.netfid; |
2065 | u32 npid = open_file->pid; | 2065 | u32 npid = open_file->pid; |
2066 | pTcon = tlink_tcon(open_file->tlink); | 2066 | pTcon = tlink_tcon(open_file->tlink); |
2067 | rc = CIFSSMBUnixSetFileInfo(xid, pTcon, args, nfid, npid); | 2067 | rc = CIFSSMBUnixSetFileInfo(xid, pTcon, args, nfid, npid); |