Commit a81041b7 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Chuck Lever

nlm: minor refactoring

Make this lookup slightly more concise, and prepare for changing how we
look this up in a following patch.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 2dc6f19e
...@@ -474,8 +474,8 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file, ...@@ -474,8 +474,8 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
__be32 ret; __be32 ret;
dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n", dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n",
locks_inode(file->f_file)->i_sb->s_id, nlmsvc_file_inode(file)->i_sb->s_id,
locks_inode(file->f_file)->i_ino, nlmsvc_file_inode(file)->i_ino,
lock->fl.fl_type, lock->fl.fl_pid, lock->fl.fl_type, lock->fl.fl_pid,
(long long)lock->fl.fl_start, (long long)lock->fl.fl_start,
(long long)lock->fl.fl_end, (long long)lock->fl.fl_end,
...@@ -581,8 +581,8 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file, ...@@ -581,8 +581,8 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
struct nlm_lockowner *test_owner; struct nlm_lockowner *test_owner;
dprintk("lockd: nlmsvc_testlock(%s/%ld, ty=%d, %Ld-%Ld)\n", dprintk("lockd: nlmsvc_testlock(%s/%ld, ty=%d, %Ld-%Ld)\n",
locks_inode(file->f_file)->i_sb->s_id, nlmsvc_file_inode(file)->i_sb->s_id,
locks_inode(file->f_file)->i_ino, nlmsvc_file_inode(file)->i_ino,
lock->fl.fl_type, lock->fl.fl_type,
(long long)lock->fl.fl_start, (long long)lock->fl.fl_start,
(long long)lock->fl.fl_end); (long long)lock->fl.fl_end);
...@@ -644,8 +644,8 @@ nlmsvc_unlock(struct net *net, struct nlm_file *file, struct nlm_lock *lock) ...@@ -644,8 +644,8 @@ nlmsvc_unlock(struct net *net, struct nlm_file *file, struct nlm_lock *lock)
int error; int error;
dprintk("lockd: nlmsvc_unlock(%s/%ld, pi=%d, %Ld-%Ld)\n", dprintk("lockd: nlmsvc_unlock(%s/%ld, pi=%d, %Ld-%Ld)\n",
locks_inode(file->f_file)->i_sb->s_id, nlmsvc_file_inode(file)->i_sb->s_id,
locks_inode(file->f_file)->i_ino, nlmsvc_file_inode(file)->i_ino,
lock->fl.fl_pid, lock->fl.fl_pid,
(long long)lock->fl.fl_start, (long long)lock->fl.fl_start,
(long long)lock->fl.fl_end); (long long)lock->fl.fl_end);
...@@ -673,8 +673,8 @@ nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct nlm_lock *l ...@@ -673,8 +673,8 @@ nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct nlm_lock *l
int status = 0; int status = 0;
dprintk("lockd: nlmsvc_cancel(%s/%ld, pi=%d, %Ld-%Ld)\n", dprintk("lockd: nlmsvc_cancel(%s/%ld, pi=%d, %Ld-%Ld)\n",
locks_inode(file->f_file)->i_sb->s_id, nlmsvc_file_inode(file)->i_sb->s_id,
locks_inode(file->f_file)->i_ino, nlmsvc_file_inode(file)->i_ino,
lock->fl.fl_pid, lock->fl.fl_pid,
(long long)lock->fl.fl_start, (long long)lock->fl.fl_start,
(long long)lock->fl.fl_end); (long long)lock->fl.fl_end);
......
...@@ -45,7 +45,7 @@ static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f) ...@@ -45,7 +45,7 @@ static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f)
static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) static inline void nlm_debug_print_file(char *msg, struct nlm_file *file)
{ {
struct inode *inode = locks_inode(file->f_file); struct inode *inode = nlmsvc_file_inode(file);
dprintk("lockd: %s %s/%ld\n", dprintk("lockd: %s %s/%ld\n",
msg, inode->i_sb->s_id, inode->i_ino); msg, inode->i_sb->s_id, inode->i_ino);
...@@ -416,7 +416,7 @@ nlmsvc_match_sb(void *datap, struct nlm_file *file) ...@@ -416,7 +416,7 @@ nlmsvc_match_sb(void *datap, struct nlm_file *file)
{ {
struct super_block *sb = datap; struct super_block *sb = datap;
return sb == locks_inode(file->f_file)->i_sb; return sb == nlmsvc_file_inode(file)->i_sb;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment