diff options
Diffstat (limited to 'fs/dcache.c')
| -rw-r--r-- | fs/dcache.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index ceb7b491d1b9..34226c20d196 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
| @@ -1889,40 +1889,13 @@ void d_instantiate_new(struct dentry *entry, struct inode *inode) | |||
| 1889 | spin_lock(&inode->i_lock); | 1889 | spin_lock(&inode->i_lock); |
| 1890 | __d_instantiate(entry, inode); | 1890 | __d_instantiate(entry, inode); |
| 1891 | WARN_ON(!(inode->i_state & I_NEW)); | 1891 | WARN_ON(!(inode->i_state & I_NEW)); |
| 1892 | inode->i_state &= ~I_NEW; | 1892 | inode->i_state &= ~I_NEW & ~I_CREATING; |
| 1893 | smp_mb(); | 1893 | smp_mb(); |
| 1894 | wake_up_bit(&inode->i_state, __I_NEW); | 1894 | wake_up_bit(&inode->i_state, __I_NEW); |
| 1895 | spin_unlock(&inode->i_lock); | 1895 | spin_unlock(&inode->i_lock); |
| 1896 | } | 1896 | } |
| 1897 | EXPORT_SYMBOL(d_instantiate_new); | 1897 | EXPORT_SYMBOL(d_instantiate_new); |
| 1898 | 1898 | ||
| 1899 | /** | ||
| 1900 | * d_instantiate_no_diralias - instantiate a non-aliased dentry | ||
| 1901 | * @entry: dentry to complete | ||
| 1902 | * @inode: inode to attach to this dentry | ||
| 1903 | * | ||
| 1904 | * Fill in inode information in the entry. If a directory alias is found, then | ||
| 1905 | * return an error (and drop inode). Together with d_materialise_unique() this | ||
| 1906 | * guarantees that a directory inode may never have more than one alias. | ||
| 1907 | */ | ||
| 1908 | int d_instantiate_no_diralias(struct dentry *entry, struct inode *inode) | ||
| 1909 | { | ||
| 1910 | BUG_ON(!hlist_unhashed(&entry->d_u.d_alias)); | ||
| 1911 | |||
| 1912 | security_d_instantiate(entry, inode); | ||
| 1913 | spin_lock(&inode->i_lock); | ||
| 1914 | if (S_ISDIR(inode->i_mode) && !hlist_empty(&inode->i_dentry)) { | ||
| 1915 | spin_unlock(&inode->i_lock); | ||
| 1916 | iput(inode); | ||
| 1917 | return -EBUSY; | ||
| 1918 | } | ||
| 1919 | __d_instantiate(entry, inode); | ||
| 1920 | spin_unlock(&inode->i_lock); | ||
| 1921 | |||
| 1922 | return 0; | ||
| 1923 | } | ||
| 1924 | EXPORT_SYMBOL(d_instantiate_no_diralias); | ||
| 1925 | |||
| 1926 | struct dentry *d_make_root(struct inode *root_inode) | 1899 | struct dentry *d_make_root(struct inode *root_inode) |
| 1927 | { | 1900 | { |
| 1928 | struct dentry *res = NULL; | 1901 | struct dentry *res = NULL; |
