diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 28cb6e735943..589f3e3f6e00 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -686,7 +686,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
686 | cFYI(1, "cifs_sfu_type failed: %d", tmprc); | 686 | cFYI(1, "cifs_sfu_type failed: %d", tmprc); |
687 | } | 687 | } |
688 | 688 | ||
689 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 689 | #ifdef CONFIG_CIFS_ACL |
690 | /* fill in 0777 bits from ACL */ | 690 | /* fill in 0777 bits from ACL */ |
691 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { | 691 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { |
692 | rc = cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path, | 692 | rc = cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path, |
@@ -697,7 +697,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
697 | goto cgii_exit; | 697 | goto cgii_exit; |
698 | } | 698 | } |
699 | } | 699 | } |
700 | #endif | 700 | #endif /* CONFIG_CIFS_ACL */ |
701 | 701 | ||
702 | /* fill in remaining high mode bits e.g. SUID, VTX */ | 702 | /* fill in remaining high mode bits e.g. SUID, VTX */ |
703 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) | 703 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) |
@@ -728,12 +728,12 @@ static const struct inode_operations cifs_ipc_inode_ops = { | |||
728 | .lookup = cifs_lookup, | 728 | .lookup = cifs_lookup, |
729 | }; | 729 | }; |
730 | 730 | ||
731 | char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb) | 731 | char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb, |
732 | struct cifsTconInfo *tcon) | ||
732 | { | 733 | { |
733 | int pplen = cifs_sb->prepathlen; | 734 | int pplen = cifs_sb->prepathlen; |
734 | int dfsplen; | 735 | int dfsplen; |
735 | char *full_path = NULL; | 736 | char *full_path = NULL; |
736 | struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); | ||
737 | 737 | ||
738 | /* if no prefix path, simply set path to the root of share to "" */ | 738 | /* if no prefix path, simply set path to the root of share to "" */ |
739 | if (pplen == 0) { | 739 | if (pplen == 0) { |
@@ -875,7 +875,7 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino) | |||
875 | char *full_path; | 875 | char *full_path; |
876 | struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); | 876 | struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); |
877 | 877 | ||
878 | full_path = cifs_build_path_to_root(cifs_sb); | 878 | full_path = cifs_build_path_to_root(cifs_sb, tcon); |
879 | if (full_path == NULL) | 879 | if (full_path == NULL) |
880 | return ERR_PTR(-ENOMEM); | 880 | return ERR_PTR(-ENOMEM); |
881 | 881 | ||
@@ -1653,6 +1653,7 @@ static bool | |||
1653 | cifs_inode_needs_reval(struct inode *inode) | 1653 | cifs_inode_needs_reval(struct inode *inode) |
1654 | { | 1654 | { |
1655 | struct cifsInodeInfo *cifs_i = CIFS_I(inode); | 1655 | struct cifsInodeInfo *cifs_i = CIFS_I(inode); |
1656 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | ||
1656 | 1657 | ||
1657 | if (cifs_i->clientCanCacheRead) | 1658 | if (cifs_i->clientCanCacheRead) |
1658 | return false; | 1659 | return false; |
@@ -1663,12 +1664,12 @@ cifs_inode_needs_reval(struct inode *inode) | |||
1663 | if (cifs_i->time == 0) | 1664 | if (cifs_i->time == 0) |
1664 | return true; | 1665 | return true; |
1665 | 1666 | ||
1666 | /* FIXME: the actimeo should be tunable */ | 1667 | if (!time_in_range(jiffies, cifs_i->time, |
1667 | if (time_after_eq(jiffies, cifs_i->time + HZ)) | 1668 | cifs_i->time + cifs_sb->actimeo)) |
1668 | return true; | 1669 | return true; |
1669 | 1670 | ||
1670 | /* hardlinked files w/ noserverino get "special" treatment */ | 1671 | /* hardlinked files w/ noserverino get "special" treatment */ |
1671 | if (!(CIFS_SB(inode->i_sb)->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) && | 1672 | if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) && |
1672 | S_ISREG(inode->i_mode) && inode->i_nlink != 1) | 1673 | S_ISREG(inode->i_mode) && inode->i_nlink != 1) |
1673 | return true; | 1674 | return true; |
1674 | 1675 | ||
@@ -2121,7 +2122,7 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs) | |||
2121 | 2122 | ||
2122 | if (attrs->ia_valid & ATTR_MODE) { | 2123 | if (attrs->ia_valid & ATTR_MODE) { |
2123 | rc = 0; | 2124 | rc = 0; |
2124 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 2125 | #ifdef CONFIG_CIFS_ACL |
2125 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { | 2126 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { |
2126 | rc = mode_to_cifs_acl(inode, full_path, mode); | 2127 | rc = mode_to_cifs_acl(inode, full_path, mode); |
2127 | if (rc) { | 2128 | if (rc) { |
@@ -2130,7 +2131,7 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs) | |||
2130 | goto cifs_setattr_exit; | 2131 | goto cifs_setattr_exit; |
2131 | } | 2132 | } |
2132 | } else | 2133 | } else |
2133 | #endif | 2134 | #endif /* CONFIG_CIFS_ACL */ |
2134 | if (((mode & S_IWUGO) == 0) && | 2135 | if (((mode & S_IWUGO) == 0) && |
2135 | (cifsInode->cifsAttrs & ATTR_READONLY) == 0) { | 2136 | (cifsInode->cifsAttrs & ATTR_READONLY) == 0) { |
2136 | 2137 | ||