summaryrefslogtreecommitdiff
path: root/fs/sdcardfs
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2017-03-10 13:54:30 -0800
committerAmit Pundir <amit.pundir@linaro.org>2017-04-10 13:12:16 +0530
commit73b25e7521514bc277d705988447ad0fe1ef1eff (patch)
tree7c457882a59d4586e6ee0f0da0c6f8ec97a97d91 /fs/sdcardfs
parent989624c14f9b69dfa67007886661b16d8aad05f9 (diff)
ANDROID: sdcardfs: move path_put outside of spinlock
Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35643557 Change-Id: Ib279ebd7dd4e5884d184d67696a93e34993bc1ef
Diffstat (limited to 'fs/sdcardfs')
-rw-r--r--fs/sdcardfs/derived_perm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/sdcardfs/derived_perm.c b/fs/sdcardfs/derived_perm.c
index 4b365b95b437..dba58d8c9d60 100644
--- a/fs/sdcardfs/derived_perm.c
+++ b/fs/sdcardfs/derived_perm.c
@@ -357,6 +357,8 @@ int is_obbpath_invalid(struct dentry *dent)
struct sdcardfs_dentry_info *di = SDCARDFS_D(dent);
struct sdcardfs_sb_info *sbi = SDCARDFS_SB(dent->d_sb);
char *path_buf, *obbpath_s;
+ int need_put = 0;
+ struct path lower_path;
/* check the base obbpath has been changed.
* this routine can check an uninitialized obb dentry as well.
@@ -383,10 +385,13 @@ int is_obbpath_invalid(struct dentry *dent)
}
//unlock_dir(lower_parent);
- path_put(&di->lower_path);
+ pathcpy(&lower_path, &di->lower_path);
+ need_put = 1;
}
}
spin_unlock(&di->lock);
+ if (need_put)
+ path_put(&lower_path);
return ret;
}