diff options
author | David Howells <dhowells@redhat.com> | 2011-01-14 13:45:47 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-15 20:07:35 -0500 |
commit | 01c64feac45cea1317263eabc4f7ee1b240f297f (patch) | |
tree | b1df5409132ef04e380104a6617d2781f8e196f0 /fs/cifs/inode.c | |
parent | 36d43a43761b004ad1879ac21471d8fc5f3157ec (diff) |
CIFS: Use d_automount() rather than abusing follow_link()
Make CIFS use the new d_automount() dentry operation rather than abusing
follow_link() on directories.
[NOTE: THIS IS UNTESTED!]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Steve French <sfrench@samba.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index b06b60620240..6c9ee8014ff0 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "fscache.h" | 32 | #include "fscache.h" |
33 | 33 | ||
34 | 34 | ||
35 | static void cifs_set_ops(struct inode *inode, const bool is_dfs_referral) | 35 | static void cifs_set_ops(struct inode *inode) |
36 | { | 36 | { |
37 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | 37 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
38 | 38 | ||
@@ -60,7 +60,7 @@ static void cifs_set_ops(struct inode *inode, const bool is_dfs_referral) | |||
60 | break; | 60 | break; |
61 | case S_IFDIR: | 61 | case S_IFDIR: |
62 | #ifdef CONFIG_CIFS_DFS_UPCALL | 62 | #ifdef CONFIG_CIFS_DFS_UPCALL |
63 | if (is_dfs_referral) { | 63 | if (IS_AUTOMOUNT(inode)) { |
64 | inode->i_op = &cifs_dfs_referral_inode_operations; | 64 | inode->i_op = &cifs_dfs_referral_inode_operations; |
65 | } else { | 65 | } else { |
66 | #else /* NO DFS support, treat as a directory */ | 66 | #else /* NO DFS support, treat as a directory */ |
@@ -167,7 +167,9 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr) | |||
167 | } | 167 | } |
168 | spin_unlock(&inode->i_lock); | 168 | spin_unlock(&inode->i_lock); |
169 | 169 | ||
170 | cifs_set_ops(inode, fattr->cf_flags & CIFS_FATTR_DFS_REFERRAL); | 170 | if (fattr->cf_flags & CIFS_FATTR_DFS_REFERRAL) |
171 | inode->i_flags |= S_AUTOMOUNT; | ||
172 | cifs_set_ops(inode); | ||
171 | } | 173 | } |
172 | 174 | ||
173 | void | 175 | void |