Merge to Fedora kernel-2.6.7-1.492
[linux-2.6.git] / fs / hugetlbfs / inode.c
index db1c175..4cecb7a 100644 (file)
@@ -327,9 +327,6 @@ static int hugetlbfs_setattr(struct dentry *dentry, struct iattr *attr)
        if (error)
                goto out;
 
-       error = security_inode_setattr(dentry, attr);
-       if (error)
-               goto out;
        if (ia_valid & ATTR_SIZE) {
                error = -EINVAL;
                if (!(attr->ia_size & ~HPAGE_MASK))
@@ -725,7 +722,7 @@ struct file *hugetlb_zero_setup(size_t size)
        struct qstr quick_string;
        char buf[16];
 
-       if (!capable(CAP_IPC_LOCK))
+       if (!can_do_mlock())
                return ERR_PTR(-EPERM);
 
        if (!is_hugepage_mem_enough(size))