diff options
-rw-r--r-- | fs/cifs/cifsfs.h | 2 | ||||
-rw-r--r-- | fs/cifs/inode.c | 34 |
2 files changed, 18 insertions, 18 deletions
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index d00b3bfe1a52..78af5850c558 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -96,5 +96,5 @@ extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); | |||
96 | extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); | 96 | extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); |
97 | extern int cifs_ioctl (struct inode * inode, struct file * filep, | 97 | extern int cifs_ioctl (struct inode * inode, struct file * filep, |
98 | unsigned int command, unsigned long arg); | 98 | unsigned int command, unsigned long arg); |
99 | #define CIFS_VERSION "1.34" | 99 | #define CIFS_VERSION "1.35" |
100 | #endif /* _CIFSFS_H */ | 100 | #endif /* _CIFSFS_H */ |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index b8b78cbb34c9..8d336a900255 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -82,12 +82,12 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
82 | /* get new inode */ | 82 | /* get new inode */ |
83 | if (*pinode == NULL) { | 83 | if (*pinode == NULL) { |
84 | *pinode = new_inode(sb); | 84 | *pinode = new_inode(sb); |
85 | if(*pinode == NULL) | 85 | if (*pinode == NULL) |
86 | return -ENOMEM; | 86 | return -ENOMEM; |
87 | /* Is an i_ino of zero legal? */ | 87 | /* Is an i_ino of zero legal? */ |
88 | /* Are there sanity checks we can use to ensure that | 88 | /* Are there sanity checks we can use to ensure that |
89 | the server is really filling in that field? */ | 89 | the server is really filling in that field? */ |
90 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 90 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { |
91 | (*pinode)->i_ino = | 91 | (*pinode)->i_ino = |
92 | (unsigned long)findData.UniqueId; | 92 | (unsigned long)findData.UniqueId; |
93 | } /* note ino incremented to unique num in new_inode */ | 93 | } /* note ino incremented to unique num in new_inode */ |
@@ -134,7 +134,7 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
134 | inode->i_gid = le64_to_cpu(findData.Gid); | 134 | inode->i_gid = le64_to_cpu(findData.Gid); |
135 | inode->i_nlink = le64_to_cpu(findData.Nlinks); | 135 | inode->i_nlink = le64_to_cpu(findData.Nlinks); |
136 | 136 | ||
137 | if(is_size_safe_to_change(cifsInfo)) { | 137 | if (is_size_safe_to_change(cifsInfo)) { |
138 | /* can not safely change the file size here if the | 138 | /* can not safely change the file size here if the |
139 | client is writing to it due to potential races */ | 139 | client is writing to it due to potential races */ |
140 | 140 | ||
@@ -162,7 +162,7 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
162 | if (S_ISREG(inode->i_mode)) { | 162 | if (S_ISREG(inode->i_mode)) { |
163 | cFYI(1, (" File inode ")); | 163 | cFYI(1, (" File inode ")); |
164 | inode->i_op = &cifs_file_inode_ops; | 164 | inode->i_op = &cifs_file_inode_ops; |
165 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) | 165 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) |
166 | inode->i_fop = &cifs_file_direct_ops; | 166 | inode->i_fop = &cifs_file_direct_ops; |
167 | else | 167 | else |
168 | inode->i_fop = &cifs_file_ops; | 168 | inode->i_fop = &cifs_file_ops; |
@@ -198,17 +198,17 @@ int cifs_get_inode_info(struct inode **pinode, | |||
198 | pTcon = cifs_sb->tcon; | 198 | pTcon = cifs_sb->tcon; |
199 | cFYI(1,("Getting info on %s ", search_path)); | 199 | cFYI(1,("Getting info on %s ", search_path)); |
200 | 200 | ||
201 | if((pfindData == NULL) && (*pinode != NULL)) { | 201 | if ((pfindData == NULL) && (*pinode != NULL)) { |
202 | if(CIFS_I(*pinode)->clientCanCacheRead) { | 202 | if (CIFS_I(*pinode)->clientCanCacheRead) { |
203 | cFYI(1,("No need to revalidate cached inode sizes")); | 203 | cFYI(1,("No need to revalidate cached inode sizes")); |
204 | return rc; | 204 | return rc; |
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
208 | /* if file info not passed in then get it from server */ | 208 | /* if file info not passed in then get it from server */ |
209 | if(pfindData == NULL) { | 209 | if (pfindData == NULL) { |
210 | buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); | 210 | buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); |
211 | if(buf == NULL) | 211 | if (buf == NULL) |
212 | return -ENOMEM; | 212 | return -ENOMEM; |
213 | pfindData = (FILE_ALL_INFO *)buf; | 213 | pfindData = (FILE_ALL_INFO *)buf; |
214 | /* could do find first instead but this returns more info */ | 214 | /* could do find first instead but this returns more info */ |
@@ -268,7 +268,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
268 | IndexNumber field is not guaranteed unique? */ | 268 | IndexNumber field is not guaranteed unique? */ |
269 | 269 | ||
270 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 270 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
271 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){ | 271 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){ |
272 | int rc1 = 0; | 272 | int rc1 = 0; |
273 | __u64 inode_num; | 273 | __u64 inode_num; |
274 | 274 | ||
@@ -277,7 +277,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
277 | cifs_sb->local_nls, | 277 | cifs_sb->local_nls, |
278 | cifs_sb->mnt_cifs_flags & | 278 | cifs_sb->mnt_cifs_flags & |
279 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 279 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
280 | if(rc1) { | 280 | if (rc1) { |
281 | cFYI(1,("GetSrvInodeNum rc %d", rc1)); | 281 | cFYI(1,("GetSrvInodeNum rc %d", rc1)); |
282 | /* BB EOPNOSUPP disable SERVER_INUM? */ | 282 | /* BB EOPNOSUPP disable SERVER_INUM? */ |
283 | } else /* do we need cast or hash to ino? */ | 283 | } else /* do we need cast or hash to ino? */ |
@@ -355,7 +355,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
355 | if (S_ISREG(inode->i_mode)) { | 355 | if (S_ISREG(inode->i_mode)) { |
356 | cFYI(1, (" File inode ")); | 356 | cFYI(1, (" File inode ")); |
357 | inode->i_op = &cifs_file_inode_ops; | 357 | inode->i_op = &cifs_file_inode_ops; |
358 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) | 358 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) |
359 | inode->i_fop = &cifs_file_direct_ops; | 359 | inode->i_fop = &cifs_file_direct_ops; |
360 | else | 360 | else |
361 | inode->i_fop = &cifs_file_ops; | 361 | inode->i_fop = &cifs_file_ops; |
@@ -422,7 +422,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
422 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 422 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
423 | 423 | ||
424 | if (!rc) { | 424 | if (!rc) { |
425 | if(direntry->d_inode) | 425 | if (direntry->d_inode) |
426 | direntry->d_inode->i_nlink--; | 426 | direntry->d_inode->i_nlink--; |
427 | } else if (rc == -ENOENT) { | 427 | } else if (rc == -ENOENT) { |
428 | d_drop(direntry); | 428 | d_drop(direntry); |
@@ -441,7 +441,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
441 | cifs_sb->mnt_cifs_flags & | 441 | cifs_sb->mnt_cifs_flags & |
442 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 442 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
443 | CIFSSMBClose(xid, pTcon, netfid); | 443 | CIFSSMBClose(xid, pTcon, netfid); |
444 | if(direntry->d_inode) | 444 | if (direntry->d_inode) |
445 | direntry->d_inode->i_nlink--; | 445 | direntry->d_inode->i_nlink--; |
446 | } | 446 | } |
447 | } else if (rc == -EACCES) { | 447 | } else if (rc == -EACCES) { |
@@ -496,7 +496,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
496 | cifs_sb->mnt_cifs_flags & | 496 | cifs_sb->mnt_cifs_flags & |
497 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 497 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
498 | if (!rc) { | 498 | if (!rc) { |
499 | if(direntry->d_inode) | 499 | if (direntry->d_inode) |
500 | direntry->d_inode->i_nlink--; | 500 | direntry->d_inode->i_nlink--; |
501 | } else if (rc == -ETXTBSY) { | 501 | } else if (rc == -ETXTBSY) { |
502 | int oplock = FALSE; | 502 | int oplock = FALSE; |
@@ -517,14 +517,14 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
517 | cifs_sb->mnt_cifs_flags & | 517 | cifs_sb->mnt_cifs_flags & |
518 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 518 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
519 | CIFSSMBClose(xid, pTcon, netfid); | 519 | CIFSSMBClose(xid, pTcon, netfid); |
520 | if(direntry->d_inode) | 520 | if (direntry->d_inode) |
521 | direntry->d_inode->i_nlink--; | 521 | direntry->d_inode->i_nlink--; |
522 | } | 522 | } |
523 | /* BB if rc = -ETXTBUSY goto the rename logic BB */ | 523 | /* BB if rc = -ETXTBUSY goto the rename logic BB */ |
524 | } | 524 | } |
525 | } | 525 | } |
526 | } | 526 | } |
527 | if(direntry->d_inode) { | 527 | if (direntry->d_inode) { |
528 | cifsInode = CIFS_I(direntry->d_inode); | 528 | cifsInode = CIFS_I(direntry->d_inode); |
529 | cifsInode->time = 0; /* will force revalidate to get info | 529 | cifsInode->time = 0; /* will force revalidate to get info |
530 | when needed */ | 530 | when needed */ |
@@ -582,7 +582,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
582 | if (direntry->d_inode) | 582 | if (direntry->d_inode) |
583 | direntry->d_inode->i_nlink = 2; | 583 | direntry->d_inode->i_nlink = 2; |
584 | if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) | 584 | if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) |
585 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { | 585 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { |
586 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, | 586 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, |
587 | mode, | 587 | mode, |
588 | (__u64)current->euid, | 588 | (__u64)current->euid, |