summaryrefslogtreecommitdiff
path: root/fs/jffs2/dir.c
diff options
context:
space:
mode:
authorArtem B. Bityutskiy <dedekind@infradead.org>2005-07-17 12:13:51 +0100
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 16:25:55 +0100
commit2b79adcca147c9f8fd1094ab4cb342d7e1790d70 (patch)
tree11238349e1e7861d8d4bb290719fc52269b78e65 /fs/jffs2/dir.c
parent730554d94607572ef8300c5c9848540b42394897 (diff)
[JFFS2] Use f->target instead of f->dents for symlink target
JFFS2 uses f->dents to store the pointer to the symlink target string (in case the inode is symlink). This is somewhat ugly to use the same field for different reasons. Introduce distinct field f->target for this purpose. Note, f->fragtree, f->dents, f->target may probably be put in a union. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/dir.c')
-rw-r--r--fs/jffs2/dir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 3ca0d25eef1d..5738df223775 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: dir.c,v 1.86 2005/07/06 12:13:09 dwmw2 Exp $
+ * $Id: dir.c,v 1.87 2005/07/17 11:13:46 dedekind Exp $
*
*/
@@ -344,9 +344,9 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
return PTR_ERR(fn);
}
- /* We use f->dents field to store the target path. */
- f->dents = kmalloc(targetlen + 1, GFP_KERNEL);
- if (!f->dents) {
+ /* We use f->target field to store the target path. */
+ f->target = kmalloc(targetlen + 1, GFP_KERNEL);
+ if (!f->target) {
printk(KERN_WARNING "Can't allocate %d bytes of memory\n", targetlen + 1);
up(&f->sem);
jffs2_complete_reservation(c);
@@ -354,8 +354,8 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
return -ENOMEM;
}
- memcpy(f->dents, target, targetlen + 1);
- D1(printk(KERN_DEBUG "jffs2_symlink: symlink's target '%s' cached\n", (char *)f->dents));
+ memcpy(f->target, target, targetlen + 1);
+ D1(printk(KERN_DEBUG "jffs2_symlink: symlink's target '%s' cached\n", (char *)f->target));
/* No data here. Only a metadata node, which will be
obsoleted by the first data write