Skip to content

Commit f1e2eda

Browse files
Trond MyklebustTrond Myklebust
authored andcommitted
NFS: Remove the BKL from the inode creation operations
nfs_instantiate() does not require the BKL, neither do the attribute updates or the RPC code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent bba67e0 commit f1e2eda

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

fs/nfs/dir.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,14 +1232,11 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode,
12321232
if ((nd->flags & LOOKUP_CREATE) != 0)
12331233
open_flags = nd->intent.open.flags;
12341234

1235-
lock_kernel();
12361235
error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, nd);
12371236
if (error != 0)
12381237
goto out_err;
1239-
unlock_kernel();
12401238
return 0;
12411239
out_err:
1242-
unlock_kernel();
12431240
d_drop(dentry);
12441241
return error;
12451242
}
@@ -1262,14 +1259,11 @@ nfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
12621259
attr.ia_mode = mode;
12631260
attr.ia_valid = ATTR_MODE;
12641261

1265-
lock_kernel();
12661262
status = NFS_PROTO(dir)->mknod(dir, dentry, &attr, rdev);
12671263
if (status != 0)
12681264
goto out_err;
1269-
unlock_kernel();
12701265
return 0;
12711266
out_err:
1272-
unlock_kernel();
12731267
d_drop(dentry);
12741268
return status;
12751269
}
@@ -1288,15 +1282,12 @@ static int nfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
12881282
attr.ia_valid = ATTR_MODE;
12891283
attr.ia_mode = mode | S_IFDIR;
12901284

1291-
lock_kernel();
12921285
error = NFS_PROTO(dir)->mkdir(dir, dentry, &attr);
12931286
if (error != 0)
12941287
goto out_err;
1295-
unlock_kernel();
12961288
return 0;
12971289
out_err:
12981290
d_drop(dentry);
1299-
unlock_kernel();
13001291
return error;
13011292
}
13021293

0 commit comments

Comments
 (0)