aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:22:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:22:40 -0400
commit5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (patch)
treeaf19ed28db83e8f52690872ac99336da1cf2fd3b /fs/reiserfs
parent5b34653963de7a6d0d8c783527457d68fddc60fb (diff)
parentfd217f4d70172c526478f2bc76859e909fdfa674 (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: (46 commits) [PATCH] fs: add a sanity check in d_free [PATCH] i_version: remount support [patch] vfs: make security_inode_setattr() calling consistent [patch 1/3] FS_MBCACHE: don't needlessly make it built-in [PATCH] move executable checking into ->permission() [PATCH] fs/dcache.c: update comment of d_validate() [RFC PATCH] touch_mnt_namespace when the mount flags change [PATCH] reiserfs: add missing llseek method [PATCH] fix ->llseek for more directories [PATCH vfs-2.6 6/6] vfs: add LOOKUP_RENAME_TARGET intent [PATCH vfs-2.6 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup [PATCH vfs-2.6 4/6] vfs: remove unnecessary fsnotify_d_instantiate() [PATCH vfs-2.6 3/6] vfs: add __d_instantiate() helper [PATCH vfs-2.6 2/6] vfs: add d_ancestor() [PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT() [PATCH] get rid of on-stack dentry in udf [PATCH 2/2] anondev: switch to IDA [PATCH 1/2] anondev: init IDR statically [JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup() [PATCH] Optimise NFS readdir hack slightly. ...
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/file.c1
-rw-r--r--fs/reiserfs/inode.c13
-rw-r--r--fs/reiserfs/namei.c11
-rw-r--r--fs/reiserfs/super.c18
4 files changed, 13 insertions, 30 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
index a804903d31d1..33408417038c 100644
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -296,6 +296,7 @@ const struct file_operations reiserfs_file_operations = {
296 .aio_write = generic_file_aio_write, 296 .aio_write = generic_file_aio_write,
297 .splice_read = generic_file_splice_read, 297 .splice_read = generic_file_splice_read,
298 .splice_write = generic_file_splice_write, 298 .splice_write = generic_file_splice_write,
299 .llseek = generic_file_llseek,
299}; 300};
300 301
301const struct inode_operations reiserfs_file_inode_operations = { 302const struct inode_operations reiserfs_file_inode_operations = {
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 5699171212ae..6c4c2c69449f 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -1522,7 +1522,6 @@ static struct dentry *reiserfs_get_dentry(struct super_block *sb,
1522 1522
1523{ 1523{
1524 struct cpu_key key; 1524 struct cpu_key key;
1525 struct dentry *result;
1526 struct inode *inode; 1525 struct inode *inode;
1527 1526
1528 key.on_disk_key.k_objectid = objectid; 1527 key.on_disk_key.k_objectid = objectid;
@@ -1535,16 +1534,8 @@ static struct dentry *reiserfs_get_dentry(struct super_block *sb,
1535 inode = NULL; 1534 inode = NULL;
1536 } 1535 }
1537 reiserfs_write_unlock(sb); 1536 reiserfs_write_unlock(sb);
1538 if (!inode) 1537
1539 inode = ERR_PTR(-ESTALE); 1538 return d_obtain_alias(inode);
1540 if (IS_ERR(inode))
1541 return ERR_CAST(inode);
1542 result = d_alloc_anon(inode);
1543 if (!result) {
1544 iput(inode);
1545 return ERR_PTR(-ENOMEM);
1546 }
1547 return result;
1548} 1539}
1549 1540
1550struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid, 1541struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid,
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index c1add28dd45e..f89ebb943f3f 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -383,7 +383,6 @@ struct dentry *reiserfs_get_parent(struct dentry *child)
383 struct inode *inode = NULL; 383 struct inode *inode = NULL;
384 struct reiserfs_dir_entry de; 384 struct reiserfs_dir_entry de;
385 INITIALIZE_PATH(path_to_entry); 385 INITIALIZE_PATH(path_to_entry);
386 struct dentry *parent;
387 struct inode *dir = child->d_inode; 386 struct inode *dir = child->d_inode;
388 387
389 if (dir->i_nlink == 0) { 388 if (dir->i_nlink == 0) {
@@ -401,15 +400,7 @@ struct dentry *reiserfs_get_parent(struct dentry *child)
401 inode = reiserfs_iget(dir->i_sb, (struct cpu_key *)&(de.de_dir_id)); 400 inode = reiserfs_iget(dir->i_sb, (struct cpu_key *)&(de.de_dir_id));
402 reiserfs_write_unlock(dir->i_sb); 401 reiserfs_write_unlock(dir->i_sb);
403 402
404 if (!inode || IS_ERR(inode)) { 403 return d_obtain_alias(inode);
405 return ERR_PTR(-EACCES);
406 }
407 parent = d_alloc_anon(inode);
408 if (!parent) {
409 iput(inode);
410 parent = ERR_PTR(-ENOMEM);
411 }
412 return parent;
413} 404}
414 405
415/* add entry to the directory (entry can be hidden). 406/* add entry to the directory (entry can be hidden).
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index d318c7e663fa..663a91f5dce8 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -2058,10 +2058,10 @@ static int reiserfs_quota_on_mount(struct super_block *sb, int type)
2058 * Standard function to be called on quota_on 2058 * Standard function to be called on quota_on
2059 */ 2059 */
2060static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, 2060static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2061 char *path, int remount) 2061 char *name, int remount)
2062{ 2062{
2063 int err; 2063 int err;
2064 struct nameidata nd; 2064 struct path path;
2065 struct inode *inode; 2065 struct inode *inode;
2066 struct reiserfs_transaction_handle th; 2066 struct reiserfs_transaction_handle th;
2067 2067
@@ -2069,16 +2069,16 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2069 return -EINVAL; 2069 return -EINVAL;
2070 /* No more checks needed? Path and format_id are bogus anyway... */ 2070 /* No more checks needed? Path and format_id are bogus anyway... */
2071 if (remount) 2071 if (remount)
2072 return vfs_quota_on(sb, type, format_id, path, 1); 2072 return vfs_quota_on(sb, type, format_id, name, 1);
2073 err = path_lookup(path, LOOKUP_FOLLOW, &nd); 2073 err = kern_path(name, LOOKUP_FOLLOW, &path);
2074 if (err) 2074 if (err)
2075 return err; 2075 return err;
2076 /* Quotafile not on the same filesystem? */ 2076 /* Quotafile not on the same filesystem? */
2077 if (nd.path.mnt->mnt_sb != sb) { 2077 if (path.mnt->mnt_sb != sb) {
2078 err = -EXDEV; 2078 err = -EXDEV;
2079 goto out; 2079 goto out;
2080 } 2080 }
2081 inode = nd.path.dentry->d_inode; 2081 inode = path.dentry->d_inode;
2082 /* We must not pack tails for quota files on reiserfs for quota IO to work */ 2082 /* We must not pack tails for quota files on reiserfs for quota IO to work */
2083 if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) { 2083 if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) {
2084 err = reiserfs_unpack(inode, NULL); 2084 err = reiserfs_unpack(inode, NULL);
@@ -2094,7 +2094,7 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2094 /* Journaling quota? */ 2094 /* Journaling quota? */
2095 if (REISERFS_SB(sb)->s_qf_names[type]) { 2095 if (REISERFS_SB(sb)->s_qf_names[type]) {
2096 /* Quotafile not of fs root? */ 2096 /* Quotafile not of fs root? */
2097 if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) 2097 if (path.dentry->d_parent != sb->s_root)
2098 reiserfs_warning(sb, 2098 reiserfs_warning(sb,
2099 "reiserfs: Quota file not on filesystem root. " 2099 "reiserfs: Quota file not on filesystem root. "
2100 "Journalled quota will not work."); 2100 "Journalled quota will not work.");
@@ -2113,9 +2113,9 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2113 if (err) 2113 if (err)
2114 goto out; 2114 goto out;
2115 } 2115 }
2116 err = vfs_quota_on_path(sb, type, format_id, &nd.path); 2116 err = vfs_quota_on_path(sb, type, format_id, &path);
2117out: 2117out:
2118 path_put(&nd.path); 2118 path_put(&path);
2119 return err; 2119 return err;
2120} 2120}
2121 2121