diff options
Diffstat (limited to 'fs/ufs/namei.c')
-rw-r--r-- | fs/ufs/namei.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index 4c26d9e8bc94..c33cb90c516d 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/time.h> | 30 | #include <linux/time.h> |
31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
32 | #include <linux/smp_lock.h> | 32 | #include <linux/smp_lock.h> |
33 | #include <linux/quotaops.h> | ||
33 | 34 | ||
34 | #include "ufs_fs.h" | 35 | #include "ufs_fs.h" |
35 | #include "ufs.h" | 36 | #include "ufs.h" |
@@ -84,6 +85,9 @@ static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, | |||
84 | int err; | 85 | int err; |
85 | 86 | ||
86 | UFSD("BEGIN\n"); | 87 | UFSD("BEGIN\n"); |
88 | |||
89 | vfs_dq_init(dir); | ||
90 | |||
87 | inode = ufs_new_inode(dir, mode); | 91 | inode = ufs_new_inode(dir, mode); |
88 | err = PTR_ERR(inode); | 92 | err = PTR_ERR(inode); |
89 | 93 | ||
@@ -107,6 +111,9 @@ static int ufs_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t | |||
107 | 111 | ||
108 | if (!old_valid_dev(rdev)) | 112 | if (!old_valid_dev(rdev)) |
109 | return -EINVAL; | 113 | return -EINVAL; |
114 | |||
115 | vfs_dq_init(dir); | ||
116 | |||
110 | inode = ufs_new_inode(dir, mode); | 117 | inode = ufs_new_inode(dir, mode); |
111 | err = PTR_ERR(inode); | 118 | err = PTR_ERR(inode); |
112 | if (!IS_ERR(inode)) { | 119 | if (!IS_ERR(inode)) { |
@@ -131,6 +138,8 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry, | |||
131 | if (l > sb->s_blocksize) | 138 | if (l > sb->s_blocksize) |
132 | goto out_notlocked; | 139 | goto out_notlocked; |
133 | 140 | ||
141 | vfs_dq_init(dir); | ||
142 | |||
134 | lock_kernel(); | 143 | lock_kernel(); |
135 | inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); | 144 | inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); |
136 | err = PTR_ERR(inode); | 145 | err = PTR_ERR(inode); |
@@ -176,6 +185,8 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir, | |||
176 | return -EMLINK; | 185 | return -EMLINK; |
177 | } | 186 | } |
178 | 187 | ||
188 | vfs_dq_init(dir); | ||
189 | |||
179 | inode->i_ctime = CURRENT_TIME_SEC; | 190 | inode->i_ctime = CURRENT_TIME_SEC; |
180 | inode_inc_link_count(inode); | 191 | inode_inc_link_count(inode); |
181 | atomic_inc(&inode->i_count); | 192 | atomic_inc(&inode->i_count); |
@@ -193,6 +204,8 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, int mode) | |||
193 | if (dir->i_nlink >= UFS_LINK_MAX) | 204 | if (dir->i_nlink >= UFS_LINK_MAX) |
194 | goto out; | 205 | goto out; |
195 | 206 | ||
207 | vfs_dq_init(dir); | ||
208 | |||
196 | lock_kernel(); | 209 | lock_kernel(); |
197 | inode_inc_link_count(dir); | 210 | inode_inc_link_count(dir); |
198 | 211 | ||
@@ -237,6 +250,8 @@ static int ufs_unlink(struct inode *dir, struct dentry *dentry) | |||
237 | struct page *page; | 250 | struct page *page; |
238 | int err = -ENOENT; | 251 | int err = -ENOENT; |
239 | 252 | ||
253 | vfs_dq_init(dir); | ||
254 | |||
240 | de = ufs_find_entry(dir, &dentry->d_name, &page); | 255 | de = ufs_find_entry(dir, &dentry->d_name, &page); |
241 | if (!de) | 256 | if (!de) |
242 | goto out; | 257 | goto out; |
@@ -281,6 +296,9 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
281 | struct ufs_dir_entry *old_de; | 296 | struct ufs_dir_entry *old_de; |
282 | int err = -ENOENT; | 297 | int err = -ENOENT; |
283 | 298 | ||
299 | vfs_dq_init(old_dir); | ||
300 | vfs_dq_init(new_dir); | ||
301 | |||
284 | old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); | 302 | old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); |
285 | if (!old_de) | 303 | if (!old_de) |
286 | goto out; | 304 | goto out; |