diff options
| author | Sachin Prabhu <sprabhu@redhat.com> | 2013-11-25 12:09:50 -0500 |
|---|---|---|
| committer | Steve French <smfrench@gmail.com> | 2014-01-20 01:13:54 -0500 |
| commit | cb084b1a9be34729bea23428c1a42f7d2f5defbc (patch) | |
| tree | c43a3a7b7c2a5975c178349df4604d323bdae54f | |
| parent | b5be1a1c4c57a092cb60c709a0491d4ecead3d58 (diff) | |
cifs: Rename MF symlink function names
Clean up camel case in functionnames.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
| -rw-r--r-- | fs/cifs/cifsproto.h | 4 | ||||
| -rw-r--r-- | fs/cifs/inode.c | 12 | ||||
| -rw-r--r-- | fs/cifs/link.c | 32 | ||||
| -rw-r--r-- | fs/cifs/readdir.c | 2 |
4 files changed, 24 insertions, 26 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 10b9ab1d1ae9..78bb6d6ad06a 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
| @@ -476,8 +476,8 @@ extern int CIFSSMBSetPosixACL(const unsigned int xid, struct cifs_tcon *tcon, | |||
| 476 | extern int CIFSGetExtAttr(const unsigned int xid, struct cifs_tcon *tcon, | 476 | extern int CIFSGetExtAttr(const unsigned int xid, struct cifs_tcon *tcon, |
| 477 | const int netfid, __u64 *pExtAttrBits, __u64 *pMask); | 477 | const int netfid, __u64 *pExtAttrBits, __u64 *pMask); |
| 478 | extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb); | 478 | extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb); |
| 479 | extern bool CIFSCouldBeMFSymlink(const struct cifs_fattr *fattr); | 479 | extern bool couldbe_mf_symlink(const struct cifs_fattr *fattr); |
| 480 | extern int CIFSCheckMFSymlink(unsigned int xid, struct cifs_tcon *tcon, | 480 | extern int check_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, |
| 481 | struct cifs_sb_info *cifs_sb, | 481 | struct cifs_sb_info *cifs_sb, |
| 482 | struct cifs_fattr *fattr, | 482 | struct cifs_fattr *fattr, |
| 483 | const unsigned char *path); | 483 | const unsigned char *path); |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 49719b8228e5..6f7f57a3a46a 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
| @@ -383,10 +383,10 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
| 383 | 383 | ||
| 384 | /* check for Minshall+French symlinks */ | 384 | /* check for Minshall+French symlinks */ |
| 385 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) { | 385 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) { |
| 386 | int tmprc = CIFSCheckMFSymlink(xid, tcon, cifs_sb, &fattr, | 386 | int tmprc = check_mf_symlink(xid, tcon, cifs_sb, &fattr, |
| 387 | full_path); | 387 | full_path); |
| 388 | if (tmprc) | 388 | if (tmprc) |
| 389 | cifs_dbg(FYI, "CIFSCheckMFSymlink: %d\n", tmprc); | 389 | cifs_dbg(FYI, "check_mf_symlink: %d\n", tmprc); |
| 390 | } | 390 | } |
| 391 | 391 | ||
| 392 | if (*pinode == NULL) { | 392 | if (*pinode == NULL) { |
| @@ -800,10 +800,10 @@ cifs_get_inode_info(struct inode **inode, const char *full_path, | |||
| 800 | 800 | ||
| 801 | /* check for Minshall+French symlinks */ | 801 | /* check for Minshall+French symlinks */ |
| 802 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) { | 802 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) { |
| 803 | tmprc = CIFSCheckMFSymlink(xid, tcon, cifs_sb, &fattr, | 803 | tmprc = check_mf_symlink(xid, tcon, cifs_sb, &fattr, |
| 804 | full_path); | 804 | full_path); |
| 805 | if (tmprc) | 805 | if (tmprc) |
| 806 | cifs_dbg(FYI, "CIFSCheckMFSymlink: %d\n", tmprc); | 806 | cifs_dbg(FYI, "check_mf_symlink: %d\n", tmprc); |
| 807 | } | 807 | } |
| 808 | 808 | ||
| 809 | if (!*inode) { | 809 | if (!*inode) { |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index c8e29682ccdb..500bc77a786e 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
| @@ -91,10 +91,8 @@ symlink_hash_err: | |||
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | static int | 93 | static int |
| 94 | CIFSParseMFSymlink(const u8 *buf, | 94 | parse_mf_symlink(const u8 *buf, unsigned int buf_len, unsigned int *_link_len, |
| 95 | unsigned int buf_len, | 95 | char **_link_str) |
| 96 | unsigned int *_link_len, | ||
| 97 | char **_link_str) | ||
| 98 | { | 96 | { |
| 99 | int rc; | 97 | int rc; |
| 100 | unsigned int link_len; | 98 | unsigned int link_len; |
| @@ -137,7 +135,7 @@ CIFSParseMFSymlink(const u8 *buf, | |||
| 137 | } | 135 | } |
| 138 | 136 | ||
| 139 | static int | 137 | static int |
| 140 | CIFSFormatMFSymlink(u8 *buf, unsigned int buf_len, const char *link_str) | 138 | format_mf_symlink(u8 *buf, unsigned int buf_len, const char *link_str) |
| 141 | { | 139 | { |
| 142 | int rc; | 140 | int rc; |
| 143 | unsigned int link_len; | 141 | unsigned int link_len; |
| @@ -181,7 +179,7 @@ CIFSFormatMFSymlink(u8 *buf, unsigned int buf_len, const char *link_str) | |||
| 181 | } | 179 | } |
| 182 | 180 | ||
| 183 | static int | 181 | static int |
| 184 | CIFSCreateMFSymLink(const unsigned int xid, struct cifs_tcon *tcon, | 182 | create_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon, |
| 185 | const char *fromName, const char *toName, | 183 | const char *fromName, const char *toName, |
| 186 | struct cifs_sb_info *cifs_sb) | 184 | struct cifs_sb_info *cifs_sb) |
| 187 | { | 185 | { |
| @@ -202,7 +200,7 @@ CIFSCreateMFSymLink(const unsigned int xid, struct cifs_tcon *tcon, | |||
| 202 | if (!buf) | 200 | if (!buf) |
| 203 | return -ENOMEM; | 201 | return -ENOMEM; |
| 204 | 202 | ||
| 205 | rc = CIFSFormatMFSymlink(buf, CIFS_MF_SYMLINK_FILE_SIZE, toName); | 203 | rc = format_mf_symlink(buf, CIFS_MF_SYMLINK_FILE_SIZE, toName); |
| 206 | if (rc != 0) { | 204 | if (rc != 0) { |
| 207 | kfree(buf); | 205 | kfree(buf); |
| 208 | return rc; | 206 | return rc; |
| @@ -238,7 +236,7 @@ CIFSCreateMFSymLink(const unsigned int xid, struct cifs_tcon *tcon, | |||
| 238 | } | 236 | } |
| 239 | 237 | ||
| 240 | static int | 238 | static int |
| 241 | CIFSQueryMFSymLink(const unsigned int xid, struct cifs_tcon *tcon, | 239 | query_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon, |
| 242 | const unsigned char *searchName, char **symlinkinfo, | 240 | const unsigned char *searchName, char **symlinkinfo, |
| 243 | const struct nls_table *nls_codepage, int remap) | 241 | const struct nls_table *nls_codepage, int remap) |
| 244 | { | 242 | { |
| @@ -282,7 +280,7 @@ CIFSQueryMFSymLink(const unsigned int xid, struct cifs_tcon *tcon, | |||
| 282 | return rc; | 280 | return rc; |
| 283 | } | 281 | } |
| 284 | 282 | ||
| 285 | rc = CIFSParseMFSymlink(buf, bytes_read, &link_len, symlinkinfo); | 283 | rc = parse_mf_symlink(buf, bytes_read, &link_len, symlinkinfo); |
| 286 | kfree(buf); | 284 | kfree(buf); |
| 287 | if (rc != 0) | 285 | if (rc != 0) |
| 288 | return rc; | 286 | return rc; |
| @@ -291,7 +289,7 @@ CIFSQueryMFSymLink(const unsigned int xid, struct cifs_tcon *tcon, | |||
| 291 | } | 289 | } |
| 292 | 290 | ||
| 293 | bool | 291 | bool |
| 294 | CIFSCouldBeMFSymlink(const struct cifs_fattr *fattr) | 292 | couldbe_mf_symlink(const struct cifs_fattr *fattr) |
| 295 | { | 293 | { |
| 296 | if (!(fattr->cf_mode & S_IFREG)) | 294 | if (!(fattr->cf_mode & S_IFREG)) |
| 297 | /* it's not a symlink */ | 295 | /* it's not a symlink */ |
| @@ -341,16 +339,16 @@ out: | |||
| 341 | } | 339 | } |
| 342 | 340 | ||
| 343 | int | 341 | int |
| 344 | CIFSCheckMFSymlink(unsigned int xid, struct cifs_tcon *tcon, | 342 | check_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, |
| 345 | struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr, | 343 | struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr, |
| 346 | const unsigned char *path) | 344 | const unsigned char *path) |
| 347 | { | 345 | { |
| 348 | int rc; | 346 | int rc; |
| 349 | u8 *buf = NULL; | 347 | u8 *buf = NULL; |
| 350 | unsigned int link_len = 0; | 348 | unsigned int link_len = 0; |
| 351 | unsigned int bytes_read = 0; | 349 | unsigned int bytes_read = 0; |
| 352 | 350 | ||
| 353 | if (!CIFSCouldBeMFSymlink(fattr)) | 351 | if (!couldbe_mf_symlink(fattr)) |
| 354 | /* it's not a symlink */ | 352 | /* it's not a symlink */ |
| 355 | return 0; | 353 | return 0; |
| 356 | 354 | ||
| @@ -370,7 +368,7 @@ CIFSCheckMFSymlink(unsigned int xid, struct cifs_tcon *tcon, | |||
| 370 | if (bytes_read == 0) /* not a symlink */ | 368 | if (bytes_read == 0) /* not a symlink */ |
| 371 | goto out; | 369 | goto out; |
| 372 | 370 | ||
| 373 | rc = CIFSParseMFSymlink(buf, bytes_read, &link_len, NULL); | 371 | rc = parse_mf_symlink(buf, bytes_read, &link_len, NULL); |
| 374 | if (rc == -EINVAL) { | 372 | if (rc == -EINVAL) { |
| 375 | /* it's not a symlink */ | 373 | /* it's not a symlink */ |
| 376 | rc = 0; | 374 | rc = 0; |
| @@ -519,7 +517,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | |||
| 519 | * and fallback to UNIX Extensions Symlinks. | 517 | * and fallback to UNIX Extensions Symlinks. |
| 520 | */ | 518 | */ |
| 521 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) | 519 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) |
| 522 | rc = CIFSQueryMFSymLink(xid, tcon, full_path, &target_path, | 520 | rc = query_mf_symlink(xid, tcon, full_path, &target_path, |
| 523 | cifs_sb->local_nls, | 521 | cifs_sb->local_nls, |
| 524 | cifs_sb->mnt_cifs_flags & | 522 | cifs_sb->mnt_cifs_flags & |
| 525 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 523 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
| @@ -576,7 +574,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
| 576 | 574 | ||
| 577 | /* BB what if DFS and this volume is on different share? BB */ | 575 | /* BB what if DFS and this volume is on different share? BB */ |
| 578 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) | 576 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) |
| 579 | rc = CIFSCreateMFSymLink(xid, pTcon, full_path, symname, | 577 | rc = create_mf_symlink(xid, pTcon, full_path, symname, |
| 580 | cifs_sb); | 578 | cifs_sb); |
| 581 | else if (pTcon->unix_ext) | 579 | else if (pTcon->unix_ext) |
| 582 | rc = CIFSUnixCreateSymLink(xid, pTcon, full_path, symname, | 580 | rc = CIFSUnixCreateSymLink(xid, pTcon, full_path, symname, |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 5940ecabbe6a..b15862e0f68c 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
| @@ -749,7 +749,7 @@ static int cifs_filldir(char *find_entry, struct file *file, | |||
| 749 | } | 749 | } |
| 750 | 750 | ||
| 751 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) && | 751 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) && |
| 752 | CIFSCouldBeMFSymlink(&fattr)) | 752 | couldbe_mf_symlink(&fattr)) |
| 753 | /* | 753 | /* |
| 754 | * trying to get the type and mode can be slow, | 754 | * trying to get the type and mode can be slow, |
| 755 | * so just call those regular files for now, and mark | 755 | * so just call those regular files for now, and mark |
