mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
fs: remove locks_inode
locks_inode was turned into a wrapper around file_inode in de2a4a501e
(Partially revert "locks: fix file locking on overlayfs"). Finish
replacing locks_inode invocations everywhere with file_inode.
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
This commit is contained in:
28
fs/locks.c
28
fs/locks.c
@@ -234,7 +234,7 @@ locks_check_ctx_file_list(struct file *filp, struct list_head *list,
|
||||
char *list_type)
|
||||
{
|
||||
struct file_lock *fl;
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
|
||||
list_for_each_entry(fl, list, fl_list)
|
||||
if (fl->fl_file == filp)
|
||||
@@ -888,7 +888,7 @@ posix_test_lock(struct file *filp, struct file_lock *fl)
|
||||
{
|
||||
struct file_lock *cfl;
|
||||
struct file_lock_context *ctx;
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
void *owner;
|
||||
void (*func)(void);
|
||||
|
||||
@@ -1331,7 +1331,7 @@ retry:
|
||||
int posix_lock_file(struct file *filp, struct file_lock *fl,
|
||||
struct file_lock *conflock)
|
||||
{
|
||||
return posix_lock_inode(locks_inode(filp), fl, conflock);
|
||||
return posix_lock_inode(file_inode(filp), fl, conflock);
|
||||
}
|
||||
EXPORT_SYMBOL(posix_lock_file);
|
||||
|
||||
@@ -1630,7 +1630,7 @@ EXPORT_SYMBOL(lease_get_mtime);
|
||||
int fcntl_getlease(struct file *filp)
|
||||
{
|
||||
struct file_lock *fl;
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct file_lock_context *ctx;
|
||||
int type = F_UNLCK;
|
||||
LIST_HEAD(dispose);
|
||||
@@ -1668,7 +1668,7 @@ int fcntl_getlease(struct file *filp)
|
||||
static int
|
||||
check_conflicting_open(struct file *filp, const long arg, int flags)
|
||||
{
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
int self_wcount = 0, self_rcount = 0;
|
||||
|
||||
if (flags & FL_LAYOUT)
|
||||
@@ -1704,7 +1704,7 @@ static int
|
||||
generic_add_lease(struct file *filp, long arg, struct file_lock **flp, void **priv)
|
||||
{
|
||||
struct file_lock *fl, *my_fl = NULL, *lease;
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct file_lock_context *ctx;
|
||||
bool is_deleg = (*flp)->fl_flags & FL_DELEG;
|
||||
int error;
|
||||
@@ -1820,7 +1820,7 @@ static int generic_delete_lease(struct file *filp, void *owner)
|
||||
{
|
||||
int error = -EAGAIN;
|
||||
struct file_lock *fl, *victim = NULL;
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct file_lock_context *ctx;
|
||||
LIST_HEAD(dispose);
|
||||
|
||||
@@ -1862,7 +1862,7 @@ static int generic_delete_lease(struct file *filp, void *owner)
|
||||
int generic_setlease(struct file *filp, long arg, struct file_lock **flp,
|
||||
void **priv)
|
||||
{
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
int error;
|
||||
|
||||
if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE))
|
||||
@@ -2351,7 +2351,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
|
||||
struct flock *flock)
|
||||
{
|
||||
struct file_lock *file_lock = locks_alloc_lock();
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct file *f;
|
||||
int error;
|
||||
|
||||
@@ -2555,7 +2555,7 @@ out:
|
||||
void locks_remove_posix(struct file *filp, fl_owner_t owner)
|
||||
{
|
||||
int error;
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct file_lock lock;
|
||||
struct file_lock_context *ctx;
|
||||
|
||||
@@ -2592,7 +2592,7 @@ static void
|
||||
locks_remove_flock(struct file *filp, struct file_lock_context *flctx)
|
||||
{
|
||||
struct file_lock fl;
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
|
||||
if (list_empty(&flctx->flc_flock))
|
||||
return;
|
||||
@@ -2637,7 +2637,7 @@ void locks_remove_file(struct file *filp)
|
||||
{
|
||||
struct file_lock_context *ctx;
|
||||
|
||||
ctx = locks_inode_context(locks_inode(filp));
|
||||
ctx = locks_inode_context(file_inode(filp));
|
||||
if (!ctx)
|
||||
return;
|
||||
|
||||
@@ -2721,7 +2721,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
|
||||
*/
|
||||
|
||||
if (fl->fl_file != NULL)
|
||||
inode = locks_inode(fl->fl_file);
|
||||
inode = file_inode(fl->fl_file);
|
||||
|
||||
seq_printf(f, "%lld: ", id);
|
||||
|
||||
@@ -2862,7 +2862,7 @@ static void __show_fd_locks(struct seq_file *f,
|
||||
void show_fd_locks(struct seq_file *f,
|
||||
struct file *filp, struct files_struct *files)
|
||||
{
|
||||
struct inode *inode = locks_inode(filp);
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct file_lock_context *ctx;
|
||||
int id = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user