Check return value of xfs_buf_get_noaddr()
PATCH 1/1 Check return value of xfs_buf_get_noaddr()
We check the return value of all other calls to xfs_buf_get_noaddr(). Make sense to do it here too.
fs/xfs/xfs_vnodeops.c +2 -0
@@ -3034,6 +3034,8 @@ xfs_zero_remaining_bytes( bp =xfs_buf_get_noaddr (mp->m_sb.sb_blocksize,XFS_IS_REALTIME_INODE (ip) ? mp->m_rtdev_targp : mp->m_ddev_targp); +if (!bp) +return ENOMEM ;for (offset = startoff; offset <= endoff; offset = lastoffset +1 ) { offset_fsb =XFS_B_TO_FSBT (mp, offset);
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 2 lines · Lachlan McIlroy
We check the return value of all other calls to
xfs_buf_get_noaddr(). Make sense to do it here too.
Looks good.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
fs/xfs/xfs_vnodeops.c xfs_zero_remaining_bytes( · line 3038
Quoted 11 lines · Lachlan McIlroy
We check the return value of all other calls to
xfs_buf_get_noaddr(). Make sense to do it here too.fs/xfs/xfs_vnodeops.c +2
-0@@ -3034,6 +3034,8 @@ xfs_zero_remaining_bytes( bp =xfs_buf_get_noaddr (mp->m_sb.sb_blocksize,XFS_IS_REALTIME_INODE (ip) ? mp->m_rtdev_targp : mp->m_ddev_targp); +if (!bp) +return ENOMEM ;
Maybe
+ return XFS_ERROR(ENOMEM);
-Eric
Quoted 8 lines
fs/xfs/xfs_vnodeops.c +0
-0for (offset = startoff; offset <= endoff; offset = lastoffset +1 ) { offset_fsb =XFS_B_TO_FSBT (mp, offset);_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 15 lines · Eric Sandeen
fs/xfs/xfs_vnodeops.c xfs_zero_remaining_bytes( · line 3038
Quoted 11 lines · Lachlan McIlroy
We check the return value of all other calls to
xfs_buf_get_noaddr(). Make sense to do it here too.fs/xfs/xfs_vnodeops.c +2
-0@@ -3034,6 +3034,8 @@ xfs_zero_remaining_bytes( bp =xfs_buf_get_noaddr (mp->m_sb.sb_blocksize,XFS_IS_REALTIME_INODE (ip) ? mp->m_rtdev_targp : mp->m_ddev_targp); +if (!bp) +return ENOMEM ;Maybe
Review
Quoted 1 line
(quoted diff) +1
-0+ return XFS_ERROR(ENOMEM);
Okay. Will do.
Quoted 13 lines
-Eric
Quoted 8 lines
fs/xfs/xfs_vnodeops.c +0
-0for (offset = startoff; offset <= endoff; offset = lastoffset +1 ) { offset_fsb =XFS_B_TO_FSBT (mp, offset);_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs