patch-2.4.10 linux/fs/ufs/balloc.c

Next file: linux/fs/ufs/truncate.c
Previous file: linux/fs/sysv/symlink.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/fs/ufs/balloc.c linux/fs/ufs/balloc.c
@@ -271,6 +271,7 @@
 		if (!tmp) {
 			ufs_error (sb, "ufs_new_fragments", "internal error, "
 				"fragment %u, tmp %u\n", fragment, tmp);
+			unlock_super (sb);
 			return (unsigned)-1;
 		}
 		if (fragment < inode->u.ufs_i.i_lastfrag) {
@@ -312,7 +313,7 @@
 			*p = SWAB32(result);
 			*err = 0;
 			inode->i_blocks += count << uspi->s_nspfshift;
-			inode->u.ufs_i.i_lastfrag = max(u32, inode->u.ufs_i.i_lastfrag, fragment + count);
+			inode->u.ufs_i.i_lastfrag = max_t(u32, inode->u.ufs_i.i_lastfrag, fragment + count);
 			NULLIFY_FRAGMENTS
 		}
 		unlock_super(sb);
@@ -327,7 +328,7 @@
 	if (result) {
 		*err = 0;
 		inode->i_blocks += count << uspi->s_nspfshift;
-		inode->u.ufs_i.i_lastfrag = max(u32, inode->u.ufs_i.i_lastfrag, fragment + count);
+		inode->u.ufs_i.i_lastfrag = max_t(u32, inode->u.ufs_i.i_lastfrag, fragment + count);
 		NULLIFY_FRAGMENTS
 		unlock_super(sb);
 		UFSD(("EXIT, result %u\n", result))
@@ -380,7 +381,7 @@
 		*p = SWAB32(result);
 		*err = 0;
 		inode->i_blocks += count << uspi->s_nspfshift;
-		inode->u.ufs_i.i_lastfrag = max(u32, inode->u.ufs_i.i_lastfrag, fragment + count);
+		inode->u.ufs_i.i_lastfrag = max_t(u32, inode->u.ufs_i.i_lastfrag, fragment + count);
 		NULLIFY_FRAGMENTS
 		unlock_super(sb);
 		if (newcount < request)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)