aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/dir.c')
-rw-r--r--fs/jffs2/dir.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 0fd15aaf2458..19bea0f95ac1 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: dir.c,v 1.88 2005/08/17 13:46:22 dedekind Exp $ 10 * $Id: dir.c,v 1.89 2005/09/07 08:34:54 havasi Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -310,7 +310,8 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
310 * Just the node will do for now, though 310 * Just the node will do for now, though
311 */ 311 */
312 namelen = dentry->d_name.len; 312 namelen = dentry->d_name.len;
313 ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &phys_ofs, &alloclen, ALLOC_NORMAL); 313 ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &phys_ofs, &alloclen,
314 ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
314 315
315 if (ret) { 316 if (ret) {
316 jffs2_free_raw_inode(ri); 317 jffs2_free_raw_inode(ri);
@@ -370,7 +371,8 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
370 up(&f->sem); 371 up(&f->sem);
371 372
372 jffs2_complete_reservation(c); 373 jffs2_complete_reservation(c);
373 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, ALLOC_NORMAL); 374 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen,
375 ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen));
374 if (ret) { 376 if (ret) {
375 /* Eep. */ 377 /* Eep. */
376 jffs2_clear_inode(inode); 378 jffs2_clear_inode(inode);
@@ -455,7 +457,8 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
455 * Just the node will do for now, though 457 * Just the node will do for now, though
456 */ 458 */
457 namelen = dentry->d_name.len; 459 namelen = dentry->d_name.len;
458 ret = jffs2_reserve_space(c, sizeof(*ri), &phys_ofs, &alloclen, ALLOC_NORMAL); 460 ret = jffs2_reserve_space(c, sizeof(*ri), &phys_ofs, &alloclen, ALLOC_NORMAL,
461 JFFS2_SUMMARY_INODE_SIZE);
459 462
460 if (ret) { 463 if (ret) {
461 jffs2_free_raw_inode(ri); 464 jffs2_free_raw_inode(ri);
@@ -498,7 +501,8 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
498 up(&f->sem); 501 up(&f->sem);
499 502
500 jffs2_complete_reservation(c); 503 jffs2_complete_reservation(c);
501 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, ALLOC_NORMAL); 504 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen,
505 ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen));
502 if (ret) { 506 if (ret) {
503 /* Eep. */ 507 /* Eep. */
504 jffs2_clear_inode(inode); 508 jffs2_clear_inode(inode);
@@ -607,7 +611,8 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
607 * Just the node will do for now, though 611 * Just the node will do for now, though
608 */ 612 */
609 namelen = dentry->d_name.len; 613 namelen = dentry->d_name.len;
610 ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &phys_ofs, &alloclen, ALLOC_NORMAL); 614 ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &phys_ofs, &alloclen,
615 ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
611 616
612 if (ret) { 617 if (ret) {
613 jffs2_free_raw_inode(ri); 618 jffs2_free_raw_inode(ri);
@@ -652,7 +657,8 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
652 up(&f->sem); 657 up(&f->sem);
653 658
654 jffs2_complete_reservation(c); 659 jffs2_complete_reservation(c);
655 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, ALLOC_NORMAL); 660 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen,
661 ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen));
656 if (ret) { 662 if (ret) {
657 /* Eep. */ 663 /* Eep. */
658 jffs2_clear_inode(inode); 664 jffs2_clear_inode(inode);