ext4: improve inode table blocks counting in ext4_num_overhead_clusters
[linux-2.6-microblaze.git] / fs / locks.c
index 66b4eef..df8b26a 100644 (file)
@@ -1863,9 +1863,10 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp,
                        void **priv)
 {
        struct inode *inode = file_inode(filp);
+       vfsuid_t vfsuid = i_uid_into_vfsuid(file_mnt_idmap(filp), inode);
        int error;
 
-       if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE))
+       if ((!vfsuid_eq_kuid(vfsuid, current_fsuid())) && !capable(CAP_LEASE))
                return -EACCES;
        if (!S_ISREG(inode->i_mode))
                return -EINVAL;
@@ -2425,7 +2426,6 @@ int fcntl_getlk64(struct file *filp, unsigned int cmd, struct flock64 *flock)
                if (flock->l_pid != 0)
                        goto out;
 
-               cmd = F_GETLK64;
                fl->fl_flags |= FL_OFDLCK;
                fl->fl_owner = filp;
        }