ext4: Clarify the locking details in mballoc
[safe/jmp/linux-2.6] / fs / ext4 / namei.c
index fea14db..f27c816 100644 (file)
@@ -2318,7 +2318,7 @@ static int ext4_link(struct dentry *old_dentry,
        struct inode *inode = old_dentry->d_inode;
        int err, retries = 0;
 
-       if (EXT4_DIR_LINK_MAX(inode))
+       if (inode->i_nlink >= EXT4_LINK_MAX)
                return -EMLINK;
 
        /*
@@ -2421,7 +2421,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
                        goto end_rename;
                retval = -EMLINK;
                if (!new_inode && new_dir != old_dir &&
-                               new_dir->i_nlink >= EXT4_LINK_MAX)
+                   EXT4_DIR_LINK_MAX(new_dir))
                        goto end_rename;
        }
        if (!new_bh) {