git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cifs: fix pointer initialization and checks in cifs_follow_symlink (try #4)
[safe/jmp/linux-2.6]
/
fs
/
9p
/
vfs_super.c
diff --git
a/fs/9p/vfs_super.c
b/fs/9p/vfs_super.c
index
bf59c39
..
ab5547f
100644
(file)
--- a/
fs/9p/vfs_super.c
+++ b/
fs/9p/vfs_super.c
@@
-37,6
+37,7
@@
#include <linux/mount.h>
#include <linux/idr.h>
#include <linux/sched.h>
#include <linux/mount.h>
#include <linux/idr.h>
#include <linux/sched.h>
+#include <linux/smp_lock.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>
@@
-111,10
+112,10
@@
static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
struct inode *inode = NULL;
struct dentry *root = NULL;
struct v9fs_session_info *v9ses = NULL;
struct inode *inode = NULL;
struct dentry *root = NULL;
struct v9fs_session_info *v9ses = NULL;
- struct p9_stat *st = NULL;
+ struct p9_
w
stat *st = NULL;
int mode = S_IRWXUGO | S_ISVTX;
int mode = S_IRWXUGO | S_ISVTX;
- uid_t uid = current
->fsuid
;
- gid_t gid = current
->fsgid
;
+ uid_t uid = current
_fsuid()
;
+ gid_t gid = current
_fsgid()
;
struct p9_fid *fid;
int retval = 0;
struct p9_fid *fid;
int retval = 0;
@@
-155,23
+156,26
@@
static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
root = d_alloc_root(inode);
if (!root) {
root = d_alloc_root(inode);
if (!root) {
+ iput(inode);
retval = -ENOMEM;
goto release_sb;
}
sb->s_root = root;
root->d_inode->i_ino = v9fs_qid2ino(&st->qid);
retval = -ENOMEM;
goto release_sb;
}
sb->s_root = root;
root->d_inode->i_ino = v9fs_qid2ino(&st->qid);
+
v9fs_stat2inode(st, root->d_inode, sb);
v9fs_stat2inode(st, root->d_inode, sb);
+
v9fs_fid_add(root, fid);
v9fs_fid_add(root, fid);
+ p9stat_free(st);
kfree(st);
kfree(st);
- return simple_set_mnt(mnt, sb);
+P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
+ simple_set_mnt(mnt, sb);
+ return 0;
release_sb:
release_sb:
- if (sb) {
- up_write(&sb->s_umount);
- deactivate_super(sb);
- }
+ deactivate_locked_super(sb);
free_stat:
kfree(st);
free_stat:
kfree(st);
@@
-225,9
+229,12
@@
static int v9fs_show_options(struct seq_file *m, struct vfsmount *mnt)
static void
v9fs_umount_begin(struct super_block *sb)
{
static void
v9fs_umount_begin(struct super_block *sb)
{
- struct v9fs_session_info *v9ses
= sb->s_fs_info
;
+ struct v9fs_session_info *v9ses;
+ lock_kernel();
+ v9ses = sb->s_fs_info;
v9fs_session_cancel(v9ses);
v9fs_session_cancel(v9ses);
+ unlock_kernel();
}
static const struct super_operations v9fs_super_ops = {
}
static const struct super_operations v9fs_super_ops = {