diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-12-07 02:10:35 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-12-07 19:25:37 +0000 |
commit | 7d161b7f41e24203b54b0f18ae0d26c18a6c6fab (patch) | |
tree | 10219d15bed51128f72e2e45fc58947071fed0c9 /fs/cifs/inode.c | |
parent | 03ceace5c6923ffbcf2b4d2e37afbffbdb5d4a67 (diff) | |
download | linux-3.10-7d161b7f41e24203b54b0f18ae0d26c18a6c6fab.tar.gz linux-3.10-7d161b7f41e24203b54b0f18ae0d26c18a6c6fab.tar.bz2 linux-3.10-7d161b7f41e24203b54b0f18ae0d26c18a6c6fab.zip |
cifs: allow calling cifs_build_path_to_root on incomplete cifs_sb
It's possible that cifs_mount will call cifs_build_path_to_root on a
newly instantiated cifs_sb. In that case, it's likely that the
master_tlink pointer has not yet been instantiated.
Fix this by having cifs_build_path_to_root take a cifsTconInfo pointer
as well, and have the caller pass that in.
Reported-and-Tested-by: Robbert Kouprie <robbert@exx.nl>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index aa48521a78c..589f3e3f6e0 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -728,12 +728,12 @@ static const struct inode_operations cifs_ipc_inode_ops = { .lookup = cifs_lookup, }; -char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb) +char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb, + struct cifsTconInfo *tcon) { int pplen = cifs_sb->prepathlen; int dfsplen; char *full_path = NULL; - struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); /* if no prefix path, simply set path to the root of share to "" */ if (pplen == 0) { @@ -875,7 +875,7 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino) char *full_path; struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); - full_path = cifs_build_path_to_root(cifs_sb); + full_path = cifs_build_path_to_root(cifs_sb, tcon); if (full_path == NULL) return ERR_PTR(-ENOMEM); |