diff options
-rw-r--r-- | fs/cifs/cifsfs.c | 2 | ||||
-rw-r--r-- | fs/cifs/cifsfs.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 6 | ||||
-rw-r--r-- | fs/cifs/connect.c | 21 | ||||
-rw-r--r-- | fs/cifs/dir.c | 17 |
5 files changed, 23 insertions, 25 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 811245b1ff2e..ca6a3796a33b 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -442,7 +442,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root) | |||
442 | seq_printf(s, ",rsize=%u", cifs_sb->rsize); | 442 | seq_printf(s, ",rsize=%u", cifs_sb->rsize); |
443 | seq_printf(s, ",wsize=%u", cifs_sb->wsize); | 443 | seq_printf(s, ",wsize=%u", cifs_sb->wsize); |
444 | /* convert actimeo and display it in seconds */ | 444 | /* convert actimeo and display it in seconds */ |
445 | seq_printf(s, ",actimeo=%lu", cifs_sb->actimeo / HZ); | 445 | seq_printf(s, ",actimeo=%lu", cifs_sb->actimeo / HZ); |
446 | 446 | ||
447 | return 0; | 447 | return 0; |
448 | } | 448 | } |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index d1389bb33ceb..65365358c976 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -125,5 +125,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); | |||
125 | extern const struct export_operations cifs_export_ops; | 125 | extern const struct export_operations cifs_export_ops; |
126 | #endif /* CONFIG_CIFS_NFSD_EXPORT */ | 126 | #endif /* CONFIG_CIFS_NFSD_EXPORT */ |
127 | 127 | ||
128 | #define CIFS_VERSION "1.77" | 128 | #define CIFS_VERSION "1.78" |
129 | #endif /* _CIFSFS_H */ | 129 | #endif /* _CIFSFS_H */ |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index f52c5ab78f9d..da2f5446fa7a 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -4844,8 +4844,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, | |||
4844 | max_len = data_end - temp; | 4844 | max_len = data_end - temp; |
4845 | node->node_name = cifs_strndup_from_utf16(temp, max_len, | 4845 | node->node_name = cifs_strndup_from_utf16(temp, max_len, |
4846 | is_unicode, nls_codepage); | 4846 | is_unicode, nls_codepage); |
4847 | if (!node->node_name) | 4847 | if (!node->node_name) { |
4848 | rc = -ENOMEM; | 4848 | rc = -ENOMEM; |
4849 | goto parse_DFS_referrals_exit; | ||
4850 | } | ||
4851 | |||
4852 | ref++; | ||
4849 | } | 4853 | } |
4850 | 4854 | ||
4851 | parse_DFS_referrals_exit: | 4855 | parse_DFS_referrals_exit: |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index f4d381e331ce..5dcc55197fb3 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -215,6 +215,8 @@ static const match_table_t cifs_mount_option_tokens = { | |||
215 | 215 | ||
216 | { Opt_ignore, "cred" }, | 216 | { Opt_ignore, "cred" }, |
217 | { Opt_ignore, "credentials" }, | 217 | { Opt_ignore, "credentials" }, |
218 | { Opt_ignore, "cred=%s" }, | ||
219 | { Opt_ignore, "credentials=%s" }, | ||
218 | { Opt_ignore, "guest" }, | 220 | { Opt_ignore, "guest" }, |
219 | { Opt_ignore, "rw" }, | 221 | { Opt_ignore, "rw" }, |
220 | { Opt_ignore, "ro" }, | 222 | { Opt_ignore, "ro" }, |
@@ -2183,6 +2185,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
2183 | tcp_ses->session_estab = false; | 2185 | tcp_ses->session_estab = false; |
2184 | tcp_ses->sequence_number = 0; | 2186 | tcp_ses->sequence_number = 0; |
2185 | tcp_ses->lstrp = jiffies; | 2187 | tcp_ses->lstrp = jiffies; |
2188 | spin_lock_init(&tcp_ses->req_lock); | ||
2186 | INIT_LIST_HEAD(&tcp_ses->tcp_ses_list); | 2189 | INIT_LIST_HEAD(&tcp_ses->tcp_ses_list); |
2187 | INIT_LIST_HEAD(&tcp_ses->smb_ses_list); | 2190 | INIT_LIST_HEAD(&tcp_ses->smb_ses_list); |
2188 | INIT_DELAYED_WORK(&tcp_ses->echo, cifs_echo_request); | 2191 | INIT_DELAYED_WORK(&tcp_ses->echo, cifs_echo_request); |
@@ -3614,22 +3617,6 @@ cifs_get_volume_info(char *mount_data, const char *devname) | |||
3614 | return volume_info; | 3617 | return volume_info; |
3615 | } | 3618 | } |
3616 | 3619 | ||
3617 | /* make sure ra_pages is a multiple of rsize */ | ||
3618 | static inline unsigned int | ||
3619 | cifs_ra_pages(struct cifs_sb_info *cifs_sb) | ||
3620 | { | ||
3621 | unsigned int reads; | ||
3622 | unsigned int rsize_pages = cifs_sb->rsize / PAGE_CACHE_SIZE; | ||
3623 | |||
3624 | if (rsize_pages >= default_backing_dev_info.ra_pages) | ||
3625 | return default_backing_dev_info.ra_pages; | ||
3626 | else if (rsize_pages == 0) | ||
3627 | return rsize_pages; | ||
3628 | |||
3629 | reads = default_backing_dev_info.ra_pages / rsize_pages; | ||
3630 | return reads * rsize_pages; | ||
3631 | } | ||
3632 | |||
3633 | int | 3620 | int |
3634 | cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) | 3621 | cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) |
3635 | { | 3622 | { |
@@ -3717,7 +3704,7 @@ try_mount_again: | |||
3717 | cifs_sb->rsize = cifs_negotiate_rsize(tcon, volume_info); | 3704 | cifs_sb->rsize = cifs_negotiate_rsize(tcon, volume_info); |
3718 | 3705 | ||
3719 | /* tune readahead according to rsize */ | 3706 | /* tune readahead according to rsize */ |
3720 | cifs_sb->bdi.ra_pages = cifs_ra_pages(cifs_sb); | 3707 | cifs_sb->bdi.ra_pages = cifs_sb->rsize / PAGE_CACHE_SIZE; |
3721 | 3708 | ||
3722 | remote_path_check: | 3709 | remote_path_check: |
3723 | #ifdef CONFIG_CIFS_DFS_UPCALL | 3710 | #ifdef CONFIG_CIFS_DFS_UPCALL |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index d172c8ed9017..ec4e9a2a12f8 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -668,12 +668,19 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) | |||
668 | return 0; | 668 | return 0; |
669 | else { | 669 | else { |
670 | /* | 670 | /* |
671 | * Forcibly invalidate automounting directory inodes | 671 | * If the inode wasn't known to be a dfs entry when |
672 | * (remote DFS directories) so to have them | 672 | * the dentry was instantiated, such as when created |
673 | * instantiated again for automount | 673 | * via ->readdir(), it needs to be set now since the |
674 | * attributes will have been updated by | ||
675 | * cifs_revalidate_dentry(). | ||
674 | */ | 676 | */ |
675 | if (IS_AUTOMOUNT(direntry->d_inode)) | 677 | if (IS_AUTOMOUNT(direntry->d_inode) && |
676 | return 0; | 678 | !(direntry->d_flags & DCACHE_NEED_AUTOMOUNT)) { |
679 | spin_lock(&direntry->d_lock); | ||
680 | direntry->d_flags |= DCACHE_NEED_AUTOMOUNT; | ||
681 | spin_unlock(&direntry->d_lock); | ||
682 | } | ||
683 | |||
677 | return 1; | 684 | return 1; |
678 | } | 685 | } |
679 | } | 686 | } |