staging: lustre: remove ll_permission()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2013 08:01:26 +0000 (16:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2013 08:01:26 +0000 (16:01 +0800)
It was a wrapper around inode_permission(), totally useless.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
drivers/staging/lustre/lustre/llite/file.c

index 868f0742c77bcf13bbac59804f96f41e29a8595a..65c7dd8eb9656bd70eb1ab49ae914c7b70147e01 100644 (file)
@@ -87,8 +87,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
 
 #define LTIME_S(time)             (time.tv_sec)
 
-#define ll_permission(inode,mask,nd)    inode_permission(inode,mask)
-
 # define ll_generic_permission(inode, mask, flags, check_acl) \
         generic_permission(inode, mask)
 
index 56bd326e7221ee48693bcbbf2ec63292d9957bd0..0a6d28f7fb58108e74935d8cbc5436ee200e7cf2 100644 (file)
@@ -1756,8 +1756,8 @@ static int ll_swap_layouts(struct file *file1, struct file *file2,
        if (!S_ISREG(llss->inode2->i_mode))
                GOTO(free, rc = -EINVAL);
 
-       if (ll_permission(llss->inode1, MAY_WRITE, NULL) ||
-           ll_permission(llss->inode2, MAY_WRITE, NULL))
+       if (inode_permission(llss->inode1, MAY_WRITE) ||
+           inode_permission(llss->inode2, MAY_WRITE))
                GOTO(free, rc = -EPERM);
 
        if (llss->inode2->i_sb != llss->inode1->i_sb)