Merge patch to ufs_vnops.c's ufs_rename to the copy of ufs_rename that
lives in ext2_vnops.c for ext2fs. Also remove cast from comparision. Bruce pointed out that it was bogus since we'd force a signed comparision when we really wanted an unsigned comparison.
This commit is contained in:
parent
86bf56f58b
commit
5369eb85ca
@ -482,6 +482,11 @@ ext2_rename(ap)
|
||||
goto abortit;
|
||||
dp = VTOI(fdvp);
|
||||
ip = VTOI(fvp);
|
||||
if (ip->i_nlink >= LINK_MAX) {
|
||||
VOP_UNLOCK(fvp, 0, p);
|
||||
error = EMLINK;
|
||||
goto abortit;
|
||||
}
|
||||
if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))
|
||||
|| (dp->i_flags & APPEND)) {
|
||||
VOP_UNLOCK(fvp, 0, p);
|
||||
|
@ -482,6 +482,11 @@ ext2_rename(ap)
|
||||
goto abortit;
|
||||
dp = VTOI(fdvp);
|
||||
ip = VTOI(fvp);
|
||||
if (ip->i_nlink >= LINK_MAX) {
|
||||
VOP_UNLOCK(fvp, 0, p);
|
||||
error = EMLINK;
|
||||
goto abortit;
|
||||
}
|
||||
if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND))
|
||||
|| (dp->i_flags & APPEND)) {
|
||||
VOP_UNLOCK(fvp, 0, p);
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
|
||||
* $Id: ufs_vnops.c,v 1.109 1999/02/25 09:52:46 imp Exp $
|
||||
* $Id: ufs_vnops.c,v 1.110 1999/02/26 05:34:16 imp Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
@ -978,7 +978,7 @@ ufs_rename(ap)
|
||||
goto abortit;
|
||||
dp = VTOI(fdvp);
|
||||
ip = VTOI(fvp);
|
||||
if ((nlink_t) ip->i_nlink >= LINK_MAX) {
|
||||
if (ip->i_nlink >= LINK_MAX) {
|
||||
VOP_UNLOCK(fvp, 0, p);
|
||||
error = EMLINK;
|
||||
goto abortit;
|
||||
|
Loading…
Reference in New Issue
Block a user