summaryrefslogtreecommitdiff
path: root/fs/fs_struct.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 09:23:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 09:23:32 -0700
commit5af568cbd55f60b5a1d174f621b273e4f585dc35 (patch)
tree7cdc1afeb267519133a29ac595df21278c556c8c /fs/fs_struct.c
parent062e27ec1b49d12bdb1ecc94d74b5fee5a5775db (diff)
parent66a362a2aa8ffa72670259fa15e2a77a01cc2217 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: isofs: Fix lseek() to position beyond 4 GB vfs: remove unused MNT_STRICTATIME vfs: show unreachable paths in getcwd and proc vfs: only add " (deleted)" where necessary vfs: add prepend_path() helper vfs: __d_path: dont prepend the name of the root dentry ia64: perfmon: add d_dname method vfs: add helpers to get root and pwd cachefiles: use path_get instead of lone dget fs/sysv/super.c: add support for non-PDP11 v7 filesystems V7: Adjust sanity checks for some volumes Add v7 alias v9fs: fixup for inode_setattr being removed Manual merge to take Al's version of the fs/sysv/super.c file: it merged cleanly, but Al had removed an unnecessary header include, so his side was better.
Diffstat (limited to 'fs/fs_struct.c')
-rw-r--r--fs/fs_struct.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/fs_struct.c b/fs/fs_struct.c
index eee059052db..1ee40eb9a2c 100644
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -106,12 +106,7 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
fs->in_exec = 0;
rwlock_init(&fs->lock);
fs->umask = old->umask;
- read_lock(&old->lock);
- fs->root = old->root;
- path_get(&old->root);
- fs->pwd = old->pwd;
- path_get(&old->pwd);
- read_unlock(&old->lock);
+ get_fs_root_and_pwd(old, &fs->root, &fs->pwd);
}
return fs;
}