diff options
| author | Daniel Rosenberg <drosen@google.com> | 2017-03-10 13:54:30 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:35:21 +0200 |
| commit | b6d14140b12586759ae2da78f8cd02cb16439faa (patch) | |
| tree | 0daf1785cd8f6b59c91609ef3969f60b09add816 /fs | |
| parent | 2dbbee543111a1e4fb309fd3d597c79898912724 (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')
| -rwxr-xr-x | fs/sdcardfs/derived_perm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/sdcardfs/derived_perm.c b/fs/sdcardfs/derived_perm.c index cc905fe09..0f0b2543f 100755 --- a/fs/sdcardfs/derived_perm.c +++ b/fs/sdcardfs/derived_perm.c @@ -348,6 +348,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. @@ -374,10 +376,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; } |
