aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 23:16:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 23:16:07 -0500
commitd895cb1af15c04c522a25c79cc429076987c089b (patch)
tree895dc9157e28f603d937a58be664e4e440d5530c /fs/lockd
parent9626357371b519f2b955fef399647181034a77fe (diff)
parentd3d009cb965eae7e002ea5badf603ea8f4c34915 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile (part one) from Al Viro: "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent locking violations, etc. The most visible changes here are death of FS_REVAL_DOT (replaced with "has ->d_weak_revalidate()") and a new helper getting from struct file to inode. Some bits of preparation to xattr method interface changes. Misc patches by various people sent this cycle *and* ocfs2 fixes from several cycles ago that should've been upstream right then. PS: the next vfs pile will be xattr stuff." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) saner proc_get_inode() calling conventions proc: avoid extra pde_put() in proc_fill_super() fs: change return values from -EACCES to -EPERM fs/exec.c: make bprm_mm_init() static ocfs2/dlm: use GFP_ATOMIC inside a spin_lock ocfs2: fix possible use-after-free with AIO ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero target: writev() on single-element vector is pointless export kernel_write(), convert open-coded instances fs: encode_fh: return FILEID_INVALID if invalid fid_type kill f_vfsmnt vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op nfsd: handle vfs_getattr errors in acl protocol switch vfs_getattr() to struct path default SET_PERSONALITY() in linux/elf.h ceph: prepopulate inodes only when request is aborted d_hash_and_lookup(): export, switch open-coded instances 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 9p: split dropping the acls from v9fs_set_create_acl() ...
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/clntlock.c2
-rw-r--r--fs/lockd/clntproc.c2
-rw-r--r--fs/lockd/svclock.c16
-rw-r--r--fs/lockd/svcsubs.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index ca0a08001449..a2717408c478 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -178,7 +178,7 @@ __be32 nlmclnt_grant(const struct sockaddr *addr, const struct nlm_lock *lock)
178 continue; 178 continue;
179 if (!rpc_cmp_addr(nlm_addr(block->b_host), addr)) 179 if (!rpc_cmp_addr(nlm_addr(block->b_host), addr))
180 continue; 180 continue;
181 if (nfs_compare_fh(NFS_FH(fl_blocked->fl_file->f_path.dentry->d_inode) ,fh) != 0) 181 if (nfs_compare_fh(NFS_FH(file_inode(fl_blocked->fl_file)) ,fh) != 0)
182 continue; 182 continue;
183 /* Alright, we found a lock. Set the return status 183 /* Alright, we found a lock. Set the return status
184 * and wake up the caller 184 * and wake up the caller
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 52e5120bb159..366277190b82 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -127,7 +127,7 @@ static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl)
127 struct nlm_lock *lock = &argp->lock; 127 struct nlm_lock *lock = &argp->lock;
128 128
129 nlmclnt_next_cookie(&argp->cookie); 129 nlmclnt_next_cookie(&argp->cookie);
130 memcpy(&lock->fh, NFS_FH(fl->fl_file->f_path.dentry->d_inode), sizeof(struct nfs_fh)); 130 memcpy(&lock->fh, NFS_FH(file_inode(fl->fl_file)), sizeof(struct nfs_fh));
131 lock->caller = utsname()->nodename; 131 lock->caller = utsname()->nodename;
132 lock->oh.data = req->a_owner; 132 lock->oh.data = req->a_owner;
133 lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s", 133 lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s",
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 8d80c990dffd..e703318c41df 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -406,8 +406,8 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
406 __be32 ret; 406 __be32 ret;
407 407
408 dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n", 408 dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n",
409 file->f_file->f_path.dentry->d_inode->i_sb->s_id, 409 file_inode(file->f_file)->i_sb->s_id,
410 file->f_file->f_path.dentry->d_inode->i_ino, 410 file_inode(file->f_file)->i_ino,
411 lock->fl.fl_type, lock->fl.fl_pid, 411 lock->fl.fl_type, lock->fl.fl_pid,
412 (long long)lock->fl.fl_start, 412 (long long)lock->fl.fl_start,
413 (long long)lock->fl.fl_end, 413 (long long)lock->fl.fl_end,
@@ -513,8 +513,8 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
513 __be32 ret; 513 __be32 ret;
514 514
515 dprintk("lockd: nlmsvc_testlock(%s/%ld, ty=%d, %Ld-%Ld)\n", 515 dprintk("lockd: nlmsvc_testlock(%s/%ld, ty=%d, %Ld-%Ld)\n",
516 file->f_file->f_path.dentry->d_inode->i_sb->s_id, 516 file_inode(file->f_file)->i_sb->s_id,
517 file->f_file->f_path.dentry->d_inode->i_ino, 517 file_inode(file->f_file)->i_ino,
518 lock->fl.fl_type, 518 lock->fl.fl_type,
519 (long long)lock->fl.fl_start, 519 (long long)lock->fl.fl_start,
520 (long long)lock->fl.fl_end); 520 (long long)lock->fl.fl_end);
@@ -606,8 +606,8 @@ nlmsvc_unlock(struct net *net, struct nlm_file *file, struct nlm_lock *lock)
606 int error; 606 int error;
607 607
608 dprintk("lockd: nlmsvc_unlock(%s/%ld, pi=%d, %Ld-%Ld)\n", 608 dprintk("lockd: nlmsvc_unlock(%s/%ld, pi=%d, %Ld-%Ld)\n",
609 file->f_file->f_path.dentry->d_inode->i_sb->s_id, 609 file_inode(file->f_file)->i_sb->s_id,
610 file->f_file->f_path.dentry->d_inode->i_ino, 610 file_inode(file->f_file)->i_ino,
611 lock->fl.fl_pid, 611 lock->fl.fl_pid,
612 (long long)lock->fl.fl_start, 612 (long long)lock->fl.fl_start,
613 (long long)lock->fl.fl_end); 613 (long long)lock->fl.fl_end);
@@ -635,8 +635,8 @@ nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct nlm_lock *l
635 int status = 0; 635 int status = 0;
636 636
637 dprintk("lockd: nlmsvc_cancel(%s/%ld, pi=%d, %Ld-%Ld)\n", 637 dprintk("lockd: nlmsvc_cancel(%s/%ld, pi=%d, %Ld-%Ld)\n",
638 file->f_file->f_path.dentry->d_inode->i_sb->s_id, 638 file_inode(file->f_file)->i_sb->s_id,
639 file->f_file->f_path.dentry->d_inode->i_ino, 639 file_inode(file->f_file)->i_ino,
640 lock->fl.fl_pid, 640 lock->fl.fl_pid,
641 (long long)lock->fl.fl_start, 641 (long long)lock->fl.fl_start,
642 (long long)lock->fl.fl_end); 642 (long long)lock->fl.fl_end);
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
index 0deb5f6c9dd4..b3a24b07d981 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -45,7 +45,7 @@ static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f)
45 45
46static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) 46static inline void nlm_debug_print_file(char *msg, struct nlm_file *file)
47{ 47{
48 struct inode *inode = file->f_file->f_path.dentry->d_inode; 48 struct inode *inode = file_inode(file->f_file);
49 49
50 dprintk("lockd: %s %s/%ld\n", 50 dprintk("lockd: %s %s/%ld\n",
51 msg, inode->i_sb->s_id, inode->i_ino); 51 msg, inode->i_sb->s_id, inode->i_ino);