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>
if ((nd->flags & LOOKUP_CREATE) != 0)
open_flags = nd->intent.open.flags;
- lock_kernel();
error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, nd);
if (error != 0)
goto out_err;
- unlock_kernel();
return 0;
out_err:
- unlock_kernel();
d_drop(dentry);
return error;
}
attr.ia_mode = mode;
attr.ia_valid = ATTR_MODE;
- lock_kernel();
status = NFS_PROTO(dir)->mknod(dir, dentry, &attr, rdev);
if (status != 0)
goto out_err;
- unlock_kernel();
return 0;
out_err:
- unlock_kernel();
d_drop(dentry);
return status;
}
attr.ia_valid = ATTR_MODE;
attr.ia_mode = mode | S_IFDIR;
- lock_kernel();
error = NFS_PROTO(dir)->mkdir(dir, dentry, &attr);
if (error != 0)
goto out_err;
- unlock_kernel();
return 0;
out_err:
d_drop(dentry);
- unlock_kernel();
return error;
}