diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-12-15 19:46:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:06 -0500 |
commit | 080497079c0bad05133fb8d1dee300bd9e6354ec (patch) | |
tree | bec38a12cc12558255b540d471f5a83489e72898 /fs/ufs | |
parent | 48bde86df0acb9f53c4fd0908d023ecae962762f (diff) |
ufs: pass qstr instead of dentry where necessary for NFS
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/dir.c | 10 | ||||
-rw-r--r-- | fs/ufs/namei.c | 8 | ||||
-rw-r--r-- | fs/ufs/ufs.h | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/fs/ufs/dir.c b/fs/ufs/dir.c index 6f671f1ac271..22af68f8b682 100644 --- a/fs/ufs/dir.c +++ b/fs/ufs/dir.c | |||
@@ -70,13 +70,13 @@ static inline unsigned long ufs_dir_pages(struct inode *inode) | |||
70 | return (inode->i_size+PAGE_CACHE_SIZE-1)>>PAGE_CACHE_SHIFT; | 70 | return (inode->i_size+PAGE_CACHE_SIZE-1)>>PAGE_CACHE_SHIFT; |
71 | } | 71 | } |
72 | 72 | ||
73 | ino_t ufs_inode_by_name(struct inode *dir, struct dentry *dentry) | 73 | ino_t ufs_inode_by_name(struct inode *dir, struct qstr *qstr) |
74 | { | 74 | { |
75 | ino_t res = 0; | 75 | ino_t res = 0; |
76 | struct ufs_dir_entry *de; | 76 | struct ufs_dir_entry *de; |
77 | struct page *page; | 77 | struct page *page; |
78 | 78 | ||
79 | de = ufs_find_entry(dir, dentry, &page); | 79 | de = ufs_find_entry(dir, qstr, &page); |
80 | if (de) { | 80 | if (de) { |
81 | res = fs32_to_cpu(dir->i_sb, de->d_ino); | 81 | res = fs32_to_cpu(dir->i_sb, de->d_ino); |
82 | ufs_put_page(page); | 82 | ufs_put_page(page); |
@@ -249,12 +249,12 @@ struct ufs_dir_entry *ufs_dotdot(struct inode *dir, struct page **p) | |||
249 | * (as a parameter - res_dir). Page is returned mapped and unlocked. | 249 | * (as a parameter - res_dir). Page is returned mapped and unlocked. |
250 | * Entry is guaranteed to be valid. | 250 | * Entry is guaranteed to be valid. |
251 | */ | 251 | */ |
252 | struct ufs_dir_entry *ufs_find_entry(struct inode *dir, struct dentry *dentry, | 252 | struct ufs_dir_entry *ufs_find_entry(struct inode *dir, struct qstr *qstr, |
253 | struct page **res_page) | 253 | struct page **res_page) |
254 | { | 254 | { |
255 | struct super_block *sb = dir->i_sb; | 255 | struct super_block *sb = dir->i_sb; |
256 | const char *name = dentry->d_name.name; | 256 | const char *name = qstr->name; |
257 | int namelen = dentry->d_name.len; | 257 | int namelen = qstr->len; |
258 | unsigned reclen = UFS_DIR_REC_LEN(namelen); | 258 | unsigned reclen = UFS_DIR_REC_LEN(namelen); |
259 | unsigned long start, n; | 259 | unsigned long start, n; |
260 | unsigned long npages = ufs_dir_pages(dir); | 260 | unsigned long npages = ufs_dir_pages(dir); |
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index 23119fe7ad62..4c26d9e8bc94 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c | |||
@@ -56,7 +56,7 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru | |||
56 | return ERR_PTR(-ENAMETOOLONG); | 56 | return ERR_PTR(-ENAMETOOLONG); |
57 | 57 | ||
58 | lock_kernel(); | 58 | lock_kernel(); |
59 | ino = ufs_inode_by_name(dir, dentry); | 59 | ino = ufs_inode_by_name(dir, &dentry->d_name); |
60 | if (ino) { | 60 | if (ino) { |
61 | inode = ufs_iget(dir->i_sb, ino); | 61 | inode = ufs_iget(dir->i_sb, ino); |
62 | if (IS_ERR(inode)) { | 62 | if (IS_ERR(inode)) { |
@@ -237,7 +237,7 @@ static int ufs_unlink(struct inode *dir, struct dentry *dentry) | |||
237 | struct page *page; | 237 | struct page *page; |
238 | int err = -ENOENT; | 238 | int err = -ENOENT; |
239 | 239 | ||
240 | de = ufs_find_entry(dir, dentry, &page); | 240 | de = ufs_find_entry(dir, &dentry->d_name, &page); |
241 | if (!de) | 241 | if (!de) |
242 | goto out; | 242 | goto out; |
243 | 243 | ||
@@ -281,7 +281,7 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
281 | struct ufs_dir_entry *old_de; | 281 | struct ufs_dir_entry *old_de; |
282 | int err = -ENOENT; | 282 | int err = -ENOENT; |
283 | 283 | ||
284 | old_de = ufs_find_entry(old_dir, old_dentry, &old_page); | 284 | old_de = ufs_find_entry(old_dir, &old_dentry->d_name, &old_page); |
285 | if (!old_de) | 285 | if (!old_de) |
286 | goto out; | 286 | goto out; |
287 | 287 | ||
@@ -301,7 +301,7 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
301 | goto out_dir; | 301 | goto out_dir; |
302 | 302 | ||
303 | err = -ENOENT; | 303 | err = -ENOENT; |
304 | new_de = ufs_find_entry(new_dir, new_dentry, &new_page); | 304 | new_de = ufs_find_entry(new_dir, &new_dentry->d_name, &new_page); |
305 | if (!new_de) | 305 | if (!new_de) |
306 | goto out_dir; | 306 | goto out_dir; |
307 | inode_inc_link_count(old_inode); | 307 | inode_inc_link_count(old_inode); |
diff --git a/fs/ufs/ufs.h b/fs/ufs/ufs.h index 644e77e13599..0b4c39bc0d9e 100644 --- a/fs/ufs/ufs.h +++ b/fs/ufs/ufs.h | |||
@@ -86,9 +86,9 @@ extern void ufs_put_cylinder (struct super_block *, unsigned); | |||
86 | /* dir.c */ | 86 | /* dir.c */ |
87 | extern const struct inode_operations ufs_dir_inode_operations; | 87 | extern const struct inode_operations ufs_dir_inode_operations; |
88 | extern int ufs_add_link (struct dentry *, struct inode *); | 88 | extern int ufs_add_link (struct dentry *, struct inode *); |
89 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); | 89 | extern ino_t ufs_inode_by_name(struct inode *, struct qstr *); |
90 | extern int ufs_make_empty(struct inode *, struct inode *); | 90 | extern int ufs_make_empty(struct inode *, struct inode *); |
91 | extern struct ufs_dir_entry *ufs_find_entry(struct inode *, struct dentry *, struct page **); | 91 | extern struct ufs_dir_entry *ufs_find_entry(struct inode *, struct qstr *, struct page **); |
92 | extern int ufs_delete_entry(struct inode *, struct ufs_dir_entry *, struct page *); | 92 | extern int ufs_delete_entry(struct inode *, struct ufs_dir_entry *, struct page *); |
93 | extern int ufs_empty_dir (struct inode *); | 93 | extern int ufs_empty_dir (struct inode *); |
94 | extern struct ufs_dir_entry *ufs_dotdot(struct inode *, struct page **); | 94 | extern struct ufs_dir_entry *ufs_dotdot(struct inode *, struct page **); |