projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
[cascardo/linux.git]
/
fs
/
fs_struct.c
diff --git
a/fs/fs_struct.c
b/fs/fs_struct.c
index
1ee40eb
..
ed45a9c
100644
(file)
--- a/
fs/fs_struct.c
+++ b/
fs/fs_struct.c
@@
-13,11
+13,11
@@
void set_fs_root(struct fs_struct *fs, struct path *path)
{
struct path old_root;
{
struct path old_root;
-
write
_lock(&fs->lock);
+
spin
_lock(&fs->lock);
old_root = fs->root;
fs->root = *path;
path_get(path);
old_root = fs->root;
fs->root = *path;
path_get(path);
-
write
_unlock(&fs->lock);
+
spin
_unlock(&fs->lock);
if (old_root.dentry)
path_put(&old_root);
}
if (old_root.dentry)
path_put(&old_root);
}
@@
-30,11
+30,11
@@
void set_fs_pwd(struct fs_struct *fs, struct path *path)
{
struct path old_pwd;
{
struct path old_pwd;
-
write
_lock(&fs->lock);
+
spin
_lock(&fs->lock);
old_pwd = fs->pwd;
fs->pwd = *path;
path_get(path);
old_pwd = fs->pwd;
fs->pwd = *path;
path_get(path);
-
write
_unlock(&fs->lock);
+
spin
_unlock(&fs->lock);
if (old_pwd.dentry)
path_put(&old_pwd);
if (old_pwd.dentry)
path_put(&old_pwd);
@@
-51,7
+51,7
@@
void chroot_fs_refs(struct path *old_root, struct path *new_root)
task_lock(p);
fs = p->fs;
if (fs) {
task_lock(p);
fs = p->fs;
if (fs) {
-
write
_lock(&fs->lock);
+
spin
_lock(&fs->lock);
if (fs->root.dentry == old_root->dentry
&& fs->root.mnt == old_root->mnt) {
path_get(new_root);
if (fs->root.dentry == old_root->dentry
&& fs->root.mnt == old_root->mnt) {
path_get(new_root);
@@
-64,7
+64,7
@@
void chroot_fs_refs(struct path *old_root, struct path *new_root)
fs->pwd = *new_root;
count++;
}
fs->pwd = *new_root;
count++;
}
-
write
_unlock(&fs->lock);
+
spin
_unlock(&fs->lock);
}
task_unlock(p);
} while_each_thread(g, p);
}
task_unlock(p);
} while_each_thread(g, p);
@@
-87,10
+87,10
@@
void exit_fs(struct task_struct *tsk)
if (fs) {
int kill;
task_lock(tsk);
if (fs) {
int kill;
task_lock(tsk);
-
write
_lock(&fs->lock);
+
spin
_lock(&fs->lock);
tsk->fs = NULL;
kill = !--fs->users;
tsk->fs = NULL;
kill = !--fs->users;
-
write
_unlock(&fs->lock);
+
spin
_unlock(&fs->lock);
task_unlock(tsk);
if (kill)
free_fs_struct(fs);
task_unlock(tsk);
if (kill)
free_fs_struct(fs);
@@
-104,7
+104,7
@@
struct fs_struct *copy_fs_struct(struct fs_struct *old)
if (fs) {
fs->users = 1;
fs->in_exec = 0;
if (fs) {
fs->users = 1;
fs->in_exec = 0;
-
rw
lock_init(&fs->lock);
+
spin_
lock_init(&fs->lock);
fs->umask = old->umask;
get_fs_root_and_pwd(old, &fs->root, &fs->pwd);
}
fs->umask = old->umask;
get_fs_root_and_pwd(old, &fs->root, &fs->pwd);
}
@@
-121,10
+121,10
@@
int unshare_fs_struct(void)
return -ENOMEM;
task_lock(current);
return -ENOMEM;
task_lock(current);
-
write
_lock(&fs->lock);
+
spin
_lock(&fs->lock);
kill = !--fs->users;
current->fs = new_fs;
kill = !--fs->users;
current->fs = new_fs;
-
write
_unlock(&fs->lock);
+
spin
_unlock(&fs->lock);
task_unlock(current);
if (kill)
task_unlock(current);
if (kill)
@@
-143,7
+143,7
@@
EXPORT_SYMBOL(current_umask);
/* to be mentioned only in INIT_TASK */
struct fs_struct init_fs = {
.users = 1,
/* to be mentioned only in INIT_TASK */
struct fs_struct init_fs = {
.users = 1,
- .lock = __
RW
_LOCK_UNLOCKED(init_fs.lock),
+ .lock = __
SPIN
_LOCK_UNLOCKED(init_fs.lock),
.umask = 0022,
};
.umask = 0022,
};
@@
-156,14
+156,14
@@
void daemonize_fs_struct(void)
task_lock(current);
task_lock(current);
-
write
_lock(&init_fs.lock);
+
spin
_lock(&init_fs.lock);
init_fs.users++;
init_fs.users++;
-
write
_unlock(&init_fs.lock);
+
spin
_unlock(&init_fs.lock);
-
write
_lock(&fs->lock);
+
spin
_lock(&fs->lock);
current->fs = &init_fs;
kill = !--fs->users;
current->fs = &init_fs;
kill = !--fs->users;
-
write
_unlock(&fs->lock);
+
spin
_unlock(&fs->lock);
task_unlock(current);
if (kill)
task_unlock(current);
if (kill)