diff options
author | Steve French <sfrench@us.ibm.com> | 2009-04-01 01:22:00 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-04-16 21:26:48 -0400 |
commit | 85a6dac54a7e28112488b02523202985edc7e639 (patch) | |
tree | 141a35196516dc428fe2891b7c7da02d0133ecad /fs/cifs/dir.c | |
parent | 74496d365ad171d11f21da4a8be71c945f6ec825 (diff) |
[CIFS] Endian convert UniqueId when reporting inode numbers from server files
Jeff made a good point that we should endian convert the UniqueId when we use
it to set i_ino Even though this value is opaque to the client, when comparing
the inode numbers of the same server file from two different clients (one
big endian, one little endian) or when we compare a big endian client's view
of i_ino with what the server thinks - we should get the same value
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 54dce78fbb73..e457e1434349 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -187,8 +187,10 @@ int cifs_posix_open(char *full_path, struct inode **pinode, | |||
187 | if (!pinode) | 187 | if (!pinode) |
188 | goto posix_open_ret; /* caller does not need info */ | 188 | goto posix_open_ret; /* caller does not need info */ |
189 | 189 | ||
190 | if (*pinode == NULL) | 190 | if (*pinode == NULL) { |
191 | *pinode = cifs_new_inode(sb, &presp_data->UniqueId); | 191 | __u64 unique_id = le64_to_cpu(presp_data->UniqueId); |
192 | *pinode = cifs_new_inode(sb, &unique_id); | ||
193 | } | ||
192 | /* else an inode was passed in. Update its info, don't create one */ | 194 | /* else an inode was passed in. Update its info, don't create one */ |
193 | 195 | ||
194 | /* We do not need to close the file if new_inode fails since | 196 | /* We do not need to close the file if new_inode fails since |