Whamcloud - gitweb
journal_start() returns ERR_PTR() and not NULL on failure.
authoradilger <adilger>
Tue, 19 Aug 2003 22:17:20 +0000 (22:17 +0000)
committeradilger <adilger>
Tue, 19 Aug 2003 22:17:20 +0000 (22:17 +0000)
lustre/obdclass/fsfilt_ext3.c

index b552935..84c9fc3 100644 (file)
@@ -571,9 +571,9 @@ static int fsfilt_ext3_write_record(struct file *file, void *buf, int size,
 
         journal = EXT3_SB(inode->i_sb)->s_journal;
         handle = journal_start(journal, EXT3_DATA_TRANS_BLOCKS + 2);
-        if (handle == NULL) {
+        if (IS_ERR(handle)) {
                 CERROR("can't start transaction\n");
-                return -EIO;
+                return PTR_ERR(handle);
         }
 
         block = *offs >> inode->i_blkbits;