summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/Kconfig1
-rw-r--r--fs/nfs/blocklayout/Makefile1
-rw-r--r--fs/nfs/client.c6
-rw-r--r--fs/nfs/delegation.c1
-rw-r--r--fs/nfs/dir.c1
-rw-r--r--fs/nfs/direct.c1
-rw-r--r--fs/nfs/file.c1
-rw-r--r--fs/nfs/filelayout/Makefile1
-rw-r--r--fs/nfs/flexfilelayout/Makefile1
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c1
-rw-r--r--fs/nfs/fscache-index.c6
-rw-r--r--fs/nfs/fscache.c6
-rw-r--r--fs/nfs/fscache.h6
-rw-r--r--fs/nfs/getroot.c6
-rw-r--r--fs/nfs/inode.c1
-rw-r--r--fs/nfs/namespace.c1
-rw-r--r--fs/nfs/nfs2super.c1
-rw-r--r--fs/nfs/nfs3client.c1
-rw-r--r--fs/nfs/nfs3super.c1
-rw-r--r--fs/nfs/nfs4client.c1
-rw-r--r--fs/nfs/nfs4proc.c32
-rw-r--r--fs/nfs/nfs4session.c1
-rw-r--r--fs/nfs/nfs4super.c1
-rw-r--r--fs/nfs/pagelist.c1
-rw-r--r--fs/nfs/pnfs_nfs.c1
-rw-r--r--fs/nfs/read.c1
-rw-r--r--fs/nfs/super.c1
-rw-r--r--fs/nfs/write.c1
28 files changed, 39 insertions, 45 deletions
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index 69d02cf8cf37..295a7a21b774 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config NFS_FS 2config NFS_FS
2 tristate "NFS client support" 3 tristate "NFS client support"
3 depends on INET && FILE_LOCKING && MULTIUSER 4 depends on INET && FILE_LOCKING && MULTIUSER
diff --git a/fs/nfs/blocklayout/Makefile b/fs/nfs/blocklayout/Makefile
index 3ca14c36d08b..7668a1bfb5fa 100644
--- a/fs/nfs/blocklayout/Makefile
+++ b/fs/nfs/blocklayout/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# Makefile for the pNFS block layout driver kernel module 3# Makefile for the pNFS block layout driver kernel module
3# 4#
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 3d04cb0b839e..d7e4f0848e28 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1,12 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* client.c: NFS client sharing and management code 2/* client.c: NFS client sharing and management code
2 * 3 *
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. 4 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 5 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */ 6 */
11 7
12 8
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 8b78274e3e56..0ff3facf81da 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/delegation.c 3 * linux/fs/nfs/delegation.c
3 * 4 *
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 47d445bec8c9..57b6a45576ad 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/dir.c 3 * linux/fs/nfs/dir.c
3 * 4 *
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 2436bd92bc00..0cb442406168 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/direct.c 3 * linux/fs/nfs/direct.c
3 * 4 *
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 144e183250c3..95dc90570786 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/file.c 3 * linux/fs/nfs/file.c
3 * 4 *
diff --git a/fs/nfs/filelayout/Makefile b/fs/nfs/filelayout/Makefile
index 8516cdffb9e9..de056312d374 100644
--- a/fs/nfs/filelayout/Makefile
+++ b/fs/nfs/filelayout/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# Makefile for the pNFS Files Layout Driver kernel module 3# Makefile for the pNFS Files Layout Driver kernel module
3# 4#
diff --git a/fs/nfs/flexfilelayout/Makefile b/fs/nfs/flexfilelayout/Makefile
index 1d2c9f6bbcd4..49f03422b6ad 100644
--- a/fs/nfs/flexfilelayout/Makefile
+++ b/fs/nfs/flexfilelayout/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# Makefile for the pNFS Flexfile Layout Driver kernel module 3# Makefile for the pNFS Flexfile Layout Driver kernel module
3# 4#
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 9920c52bd0cd..bcff3bf5ae09 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Module for pnfs flexfile layout driver. 3 * Module for pnfs flexfile layout driver.
3 * 4 *
diff --git a/fs/nfs/fscache-index.c b/fs/nfs/fscache-index.c
index 666415d13d52..15f271401dcc 100644
--- a/fs/nfs/fscache-index.c
+++ b/fs/nfs/fscache-index.c
@@ -1,12 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* NFS FS-Cache index structure definition 2/* NFS FS-Cache index structure definition
2 * 3 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. 4 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 5 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */ 6 */
11 7
12#include <linux/init.h> 8#include <linux/init.h>
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index 4dc887813c71..53507aa96b0b 100644
--- a/fs/nfs/fscache.c
+++ b/fs/nfs/fscache.c
@@ -1,12 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* NFS filesystem cache interface 2/* NFS filesystem cache interface
2 * 3 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. 4 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 5 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */ 6 */
11 7
12#include <linux/init.h> 8#include <linux/init.h>
diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h
index 161ba2edb9d0..25a75e40d91d 100644
--- a/fs/nfs/fscache.h
+++ b/fs/nfs/fscache.h
@@ -1,12 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* NFS filesystem cache interface definitions 2/* NFS filesystem cache interface definitions
2 * 3 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. 4 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 5 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */ 6 */
11 7
12#ifndef _NFS_FSCACHE_H 8#ifndef _NFS_FSCACHE_H
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 391dafaf9182..878c4c5982d9 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -1,12 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* getroot.c: get the root dentry for an NFS mount 2/* getroot.c: get the root dentry for an NFS mount
2 * 3 *
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. 4 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 5 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */ 6 */
11 7
12#include <linux/module.h> 8#include <linux/module.h>
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 3bc2550cfe4e..0b4a1a974411 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/inode.c 3 * linux/fs/nfs/inode.c
3 * 4 *
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index 15f099a24c29..9287eb666322 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/namespace.c 3 * linux/fs/nfs/namespace.c
3 * 4 *
diff --git a/fs/nfs/nfs2super.c b/fs/nfs/nfs2super.c
index 0a9782c9171a..467f21ee6a35 100644
--- a/fs/nfs/nfs2super.c
+++ b/fs/nfs/nfs2super.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2012 Netapp, Inc. All rights reserved. 3 * Copyright (c) 2012 Netapp, Inc. All rights reserved.
3 */ 4 */
diff --git a/fs/nfs/nfs3client.c b/fs/nfs/nfs3client.c
index 1afdb0f7473f..fb0c425b5d45 100644
--- a/fs/nfs/nfs3client.c
+++ b/fs/nfs/nfs3client.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1#include <linux/nfs_fs.h> 2#include <linux/nfs_fs.h>
2#include <linux/nfs_mount.h> 3#include <linux/nfs_mount.h>
3#include <linux/sunrpc/addr.h> 4#include <linux/sunrpc/addr.h>
diff --git a/fs/nfs/nfs3super.c b/fs/nfs/nfs3super.c
index 5c4394e4656b..7c5809431e61 100644
--- a/fs/nfs/nfs3super.c
+++ b/fs/nfs/nfs3super.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2012 Netapp, Inc. All rights reserved. 3 * Copyright (c) 2012 Netapp, Inc. All rights reserved.
3 */ 4 */
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 3ce246346f02..81b9b6d7927a 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
3 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c29cbef6b53f..e38f4af20950 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6932,7 +6932,6 @@ struct nfs4_lock_waiter {
6932 struct task_struct *task; 6932 struct task_struct *task;
6933 struct inode *inode; 6933 struct inode *inode;
6934 struct nfs_lowner *owner; 6934 struct nfs_lowner *owner;
6935 bool notified;
6936}; 6935};
6937 6936
6938static int 6937static int
@@ -6954,13 +6953,13 @@ nfs4_wake_lock_waiter(wait_queue_entry_t *wait, unsigned int mode, int flags, vo
6954 /* Make sure it's for the right inode */ 6953 /* Make sure it's for the right inode */
6955 if (nfs_compare_fh(NFS_FH(waiter->inode), &cbnl->cbnl_fh)) 6954 if (nfs_compare_fh(NFS_FH(waiter->inode), &cbnl->cbnl_fh))
6956 return 0; 6955 return 0;
6957
6958 waiter->notified = true;
6959 } 6956 }
6960 6957
6961 /* override "private" so we can use default_wake_function */ 6958 /* override "private" so we can use default_wake_function */
6962 wait->private = waiter->task; 6959 wait->private = waiter->task;
6963 ret = autoremove_wake_function(wait, mode, flags, key); 6960 ret = woken_wake_function(wait, mode, flags, key);
6961 if (ret)
6962 list_del_init(&wait->entry);
6964 wait->private = waiter; 6963 wait->private = waiter;
6965 return ret; 6964 return ret;
6966} 6965}
@@ -6969,7 +6968,6 @@ static int
6969nfs4_retry_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) 6968nfs4_retry_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
6970{ 6969{
6971 int status = -ERESTARTSYS; 6970 int status = -ERESTARTSYS;
6972 unsigned long flags;
6973 struct nfs4_lock_state *lsp = request->fl_u.nfs4_fl.owner; 6971 struct nfs4_lock_state *lsp = request->fl_u.nfs4_fl.owner;
6974 struct nfs_server *server = NFS_SERVER(state->inode); 6972 struct nfs_server *server = NFS_SERVER(state->inode);
6975 struct nfs_client *clp = server->nfs_client; 6973 struct nfs_client *clp = server->nfs_client;
@@ -6979,8 +6977,7 @@ nfs4_retry_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
6979 .s_dev = server->s_dev }; 6977 .s_dev = server->s_dev };
6980 struct nfs4_lock_waiter waiter = { .task = current, 6978 struct nfs4_lock_waiter waiter = { .task = current,
6981 .inode = state->inode, 6979 .inode = state->inode,
6982 .owner = &owner, 6980 .owner = &owner};
6983 .notified = false };
6984 wait_queue_entry_t wait; 6981 wait_queue_entry_t wait;
6985 6982
6986 /* Don't bother with waitqueue if we don't expect a callback */ 6983 /* Don't bother with waitqueue if we don't expect a callback */
@@ -6990,27 +6987,22 @@ nfs4_retry_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
6990 init_wait(&wait); 6987 init_wait(&wait);
6991 wait.private = &waiter; 6988 wait.private = &waiter;
6992 wait.func = nfs4_wake_lock_waiter; 6989 wait.func = nfs4_wake_lock_waiter;
6993 add_wait_queue(q, &wait);
6994 6990
6995 while(!signalled()) { 6991 while(!signalled()) {
6996 waiter.notified = false; 6992 add_wait_queue(q, &wait);
6997 status = nfs4_proc_setlk(state, cmd, request); 6993 status = nfs4_proc_setlk(state, cmd, request);
6998 if ((status != -EAGAIN) || IS_SETLK(cmd)) 6994 if ((status != -EAGAIN) || IS_SETLK(cmd)) {
6995 finish_wait(q, &wait);
6999 break; 6996 break;
7000
7001 status = -ERESTARTSYS;
7002 spin_lock_irqsave(&q->lock, flags);
7003 if (waiter.notified) {
7004 spin_unlock_irqrestore(&q->lock, flags);
7005 continue;
7006 } 6997 }
7007 set_current_state(TASK_INTERRUPTIBLE);
7008 spin_unlock_irqrestore(&q->lock, flags);
7009 6998
7010 freezable_schedule_timeout(NFS4_LOCK_MAXTIMEOUT); 6999 status = -ERESTARTSYS;
7000 freezer_do_not_count();
7001 wait_woken(&wait, TASK_INTERRUPTIBLE, NFS4_LOCK_MAXTIMEOUT);
7002 freezer_count();
7003 finish_wait(q, &wait);
7011 } 7004 }
7012 7005
7013 finish_wait(q, &wait);
7014 return status; 7006 return status;
7015} 7007}
7016#else /* !CONFIG_NFS_V4_1 */ 7008#else /* !CONFIG_NFS_V4_1 */
diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c
index bcb532def9e2..4145a0138907 100644
--- a/fs/nfs/nfs4session.c
+++ b/fs/nfs/nfs4session.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * fs/nfs/nfs4session.c 3 * fs/nfs/nfs4session.c
3 * 4 *
diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c
index 689977e148cb..04c57066a11a 100644
--- a/fs/nfs/nfs4super.c
+++ b/fs/nfs/nfs4super.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (c) 2012 Bryan Schumaker <bjschuma@netapp.com> 3 * Copyright (c) 2012 Bryan Schumaker <bjschuma@netapp.com>
3 */ 4 */
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 6ec30014a439..6ef5278326b6 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/pagelist.c 3 * linux/fs/nfs/pagelist.c
3 * 4 *
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index f5ad75fafc3c..c0046c348910 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Common NFS I/O operations for the pnfs file based 3 * Common NFS I/O operations for the pnfs file based
3 * layout drivers. 4 * layout drivers.
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index c799e540ed1e..c19841c82b6a 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/read.c 3 * linux/fs/nfs/read.c
3 * 4 *
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index d6c687419a81..f88ddac2dcdf 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/super.c 3 * linux/fs/nfs/super.c
3 * 4 *
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index bc5bb9323412..059a7c38bc4f 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/fs/nfs/write.c 3 * linux/fs/nfs/write.c
3 * 4 *