diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-24 13:03:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-24 13:03:12 -0400 |
commit | 936940a9c7e3d99b25859bf1ff140d8c2480183a (patch) | |
tree | ddce374cdab91939fef576dbdd4c66d13a9c0299 /fs/namei.c | |
parent | 09ce42d3167e3f20b501fa780c2415332330fac5 (diff) | |
parent | 1cbd20d820c36f52543e3e4cd0067ebf52aa388f (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: (23 commits)
switch xfs to generic acl caching helpers
helpers for acl caching + switch to those
switch shmem to inode->i_acl
switch reiserfs to inode->i_acl
switch reiserfs to usual conventions for caching ACLs
reiserfs: minimal fix for ACL caching
switch nilfs2 to inode->i_acl
switch btrfs to inode->i_acl
switch jffs2 to inode->i_acl
switch jfs to inode->i_acl
switch ext4 to inode->i_acl
switch ext3 to inode->i_acl
switch ext2 to inode->i_acl
add caching of ACLs in struct inode
fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls
cleanup __writeback_single_inode
... and the same for vfsmount id/mount group id
Make allocation of anon devices cheaper
update Documentation/filesystems/Locking
devpts: remove module-related code
...
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index 527119afb6a5..5b961eb71cbf 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1698,8 +1698,11 @@ struct file *do_filp_open(int dfd, const char *pathname, | |||
1698 | if (error) | 1698 | if (error) |
1699 | return ERR_PTR(error); | 1699 | return ERR_PTR(error); |
1700 | error = path_walk(pathname, &nd); | 1700 | error = path_walk(pathname, &nd); |
1701 | if (error) | 1701 | if (error) { |
1702 | if (nd.root.mnt) | ||
1703 | path_put(&nd.root); | ||
1702 | return ERR_PTR(error); | 1704 | return ERR_PTR(error); |
1705 | } | ||
1703 | if (unlikely(!audit_dummy_context())) | 1706 | if (unlikely(!audit_dummy_context())) |
1704 | audit_inode(pathname, nd.path.dentry); | 1707 | audit_inode(pathname, nd.path.dentry); |
1705 | 1708 | ||
@@ -1759,6 +1762,8 @@ do_last: | |||
1759 | } | 1762 | } |
1760 | filp = nameidata_to_filp(&nd, open_flag); | 1763 | filp = nameidata_to_filp(&nd, open_flag); |
1761 | mnt_drop_write(nd.path.mnt); | 1764 | mnt_drop_write(nd.path.mnt); |
1765 | if (nd.root.mnt) | ||
1766 | path_put(&nd.root); | ||
1762 | return filp; | 1767 | return filp; |
1763 | } | 1768 | } |
1764 | 1769 | ||
@@ -1819,6 +1824,8 @@ ok: | |||
1819 | */ | 1824 | */ |
1820 | if (will_write) | 1825 | if (will_write) |
1821 | mnt_drop_write(nd.path.mnt); | 1826 | mnt_drop_write(nd.path.mnt); |
1827 | if (nd.root.mnt) | ||
1828 | path_put(&nd.root); | ||
1822 | return filp; | 1829 | return filp; |
1823 | 1830 | ||
1824 | exit_mutex_unlock: | 1831 | exit_mutex_unlock: |
@@ -1859,6 +1866,8 @@ do_link: | |||
1859 | * with "intent.open". | 1866 | * with "intent.open". |
1860 | */ | 1867 | */ |
1861 | release_open_intent(&nd); | 1868 | release_open_intent(&nd); |
1869 | if (nd.root.mnt) | ||
1870 | path_put(&nd.root); | ||
1862 | return ERR_PTR(error); | 1871 | return ERR_PTR(error); |
1863 | } | 1872 | } |
1864 | nd.flags &= ~LOOKUP_PARENT; | 1873 | nd.flags &= ~LOOKUP_PARENT; |