]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/locks.c
CRED: Wrap task credential accesses in the filesystem subsystem
[net-next-2.6.git] / fs / locks.c
index 09062e3ff104d7222d4725d757c5493da3ad68fa..46a2e12f7d422992e5f6e48cbc6fb9f07b225e3b 100644 (file)
@@ -1349,7 +1349,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)
        struct inode *inode = dentry->d_inode;
        int error, rdlease_count = 0, wrlease_count = 0;
 
-       if ((current->fsuid != inode->i_uid) && !capable(CAP_LEASE))
+       if ((current_fsuid() != inode->i_uid) && !capable(CAP_LEASE))
                return -EACCES;
        if (!S_ISREG(inode->i_mode))
                return -EINVAL;