lkml.org 
[lkml]   [2000]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSmall bugfix in ext2/namei.c
  Hello.

Following patch against 2.4.0-test7 fixes returning of errors from
ext2_new_inode(). Currenly if ext2_new_inode() failed EIO was returned
from functions like ext2_create() which is bad as it can fail also
with EDQUOT and such.

Honza

--- fs/ext2/namei.c Fri Sep 1 12:23:51 2000
+++ fs/ext2/namei.c Fri Sep 1 12:25:11 2000
@@ -367,11 +367,11 @@
int err;

/*
- * N.B. Several error exits in ext2_new_inode don't set err.
+ * Errors like EDQUOT can happen...
*/
inode = ext2_new_inode (dir, mode, &err);
if (!inode)
- return -EIO;
+ return err;

inode->i_op = &ext2_file_inode_operations;
inode->i_fop = &ext2_file_operations;
@@ -397,7 +397,7 @@

inode = ext2_new_inode (dir, mode, &err);
if (!inode)
- return -EIO;
+ return err;

inode->i_uid = current->fsuid;
init_special_inode(inode, mode, rdev);
@@ -428,7 +428,7 @@

inode = ext2_new_inode (dir, S_IFDIR, &err);
if (!inode)
- return -EIO;
+ return err;

inode->i_op = &ext2_dir_inode_operations;
inode->i_fop = &ext2_dir_operations;
@@ -634,7 +634,7 @@
return -ENAMETOOLONG;

if (!(inode = ext2_new_inode (dir, S_IFLNK, &err)))
- return -EIO;
+ return err;

inode->i_mode = S_IFLNK | S_IRWXUGO;
\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.042 / U:0.032 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site