Commit 4964dd29 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull AFS fixes from David Howells:
 "A set of small patches to fix some things, most of them minor.

   - Fix a memory leak in afs_put_sysnames()

   - Fix an oops in AFS file locking

   - Fix new use of BUG()

   - Fix debugging statements containing %px

   - Remove afs_zero_fid as it's unused

   - Make afs_zap_data() static"

* tag 'afs-fixes-20200609' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
  afs: Make afs_zap_data() static
  afs: Remove afs_zero_fid as it's not used
  afs: Fix debugging statements with %px to be %p
  afs: Fix use of BUG()
  afs: Fix file locking
  afs: Fix memory leak in afs_put_sysnames()
parents 42612e77 c68421bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -980,7 +980,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
	if (!IS_ERR_OR_NULL(inode))
		fid = AFS_FS_I(inode)->fid;

	_debug("splice %px", dentry->d_inode);
	_debug("splice %p", dentry->d_inode);
	d = d_splice_alias(inode, dentry);
	if (!IS_ERR_OR_NULL(d)) {
		d->d_fsdata = dentry->d_fsdata;
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static void afs_schedule_lock_extension(struct afs_vnode *vnode)
void afs_lock_op_done(struct afs_call *call)
{
	struct afs_operation *op = call->op;
	struct afs_vnode *vnode = op->lock.lvnode;
	struct afs_vnode *vnode = op->file[0].vnode;

	if (call->error == 0) {
		spin_lock(&vnode->lock);
+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ error:
 * mark the data attached to an inode as obsolete due to a write on the server
 * - might also want to ditch all the outstanding writes and dirty pages
 */
void afs_zap_data(struct afs_vnode *vnode)
static void afs_zap_data(struct afs_vnode *vnode)
{
	_enter("{%llx:%llu}", vnode->fid.vid, vnode->fid.vnode);

+0 −2
Original line number Diff line number Diff line
@@ -795,7 +795,6 @@ struct afs_operation {
			struct afs_read *req;
		} fetch;
		struct {
			struct afs_vnode *lvnode;	/* vnode being locked */
			afs_lock_type_t type;
		} lock;
		struct {
@@ -1070,7 +1069,6 @@ extern int afs_ilookup5_test_by_fid(struct inode *, void *);
extern struct inode *afs_iget_pseudo_dir(struct super_block *, bool);
extern struct inode *afs_iget(struct afs_operation *, struct afs_vnode_param *);
extern struct inode *afs_root_iget(struct super_block *, struct key *);
extern void afs_zap_data(struct afs_vnode *);
extern bool afs_check_validity(struct afs_vnode *);
extern int afs_validate(struct afs_vnode *, struct key *);
extern int afs_getattr(const struct path *, struct kstat *, u32, unsigned int);
+1 −0
Original line number Diff line number Diff line
@@ -567,6 +567,7 @@ void afs_put_sysnames(struct afs_sysnames *sysnames)
			if (sysnames->subs[i] != afs_init_sysname &&
			    sysnames->subs[i] != sysnames->blank)
				kfree(sysnames->subs[i]);
		kfree(sysnames);
	}
}

Loading