diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 14:41:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-02 14:41:01 -0400 |
commit | d211858837ff8d8e31942ca7d27e6e08b3b46f5e (patch) | |
tree | a8ec83a791066e64ad02052498dbe39ebefacab9 /fs/udf/inode.c | |
parent | f1f8935a5c38a2c61e86a42bc971a2539eef2211 (diff) | |
parent | f0023bc617ba600956b9226f1806033d7486c8ba (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue:
vfs: add d_prune dentry operation
vfs: protect i_nlink
filesystems: add set_nlink()
filesystems: add missing nlink wrappers
logfs: remove unnecessary nlink setting
ocfs2: remove unnecessary nlink setting
jfs: remove unnecessary nlink setting
hypfs: remove unnecessary nlink setting
vfs: ignore error on forced remount
readlinkat: ensure we return ENOENT for the empty pathname for normal lookups
vfs: fix dentry leak in simple_fill_super()
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r-- | fs/udf/inode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 329e7a108ab7..4fd1d809738c 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -1241,6 +1241,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh) | |||
1241 | int offset; | 1241 | int offset; |
1242 | struct udf_sb_info *sbi = UDF_SB(inode->i_sb); | 1242 | struct udf_sb_info *sbi = UDF_SB(inode->i_sb); |
1243 | struct udf_inode_info *iinfo = UDF_I(inode); | 1243 | struct udf_inode_info *iinfo = UDF_I(inode); |
1244 | unsigned int link_count; | ||
1244 | 1245 | ||
1245 | fe = (struct fileEntry *)bh->b_data; | 1246 | fe = (struct fileEntry *)bh->b_data; |
1246 | efe = (struct extendedFileEntry *)bh->b_data; | 1247 | efe = (struct extendedFileEntry *)bh->b_data; |
@@ -1323,9 +1324,10 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh) | |||
1323 | inode->i_mode &= ~sbi->s_umask; | 1324 | inode->i_mode &= ~sbi->s_umask; |
1324 | read_unlock(&sbi->s_cred_lock); | 1325 | read_unlock(&sbi->s_cred_lock); |
1325 | 1326 | ||
1326 | inode->i_nlink = le16_to_cpu(fe->fileLinkCount); | 1327 | link_count = le16_to_cpu(fe->fileLinkCount); |
1327 | if (!inode->i_nlink) | 1328 | if (!link_count) |
1328 | inode->i_nlink = 1; | 1329 | link_count = 1; |
1330 | set_nlink(inode, link_count); | ||
1329 | 1331 | ||
1330 | inode->i_size = le64_to_cpu(fe->informationLength); | 1332 | inode->i_size = le64_to_cpu(fe->informationLength); |
1331 | iinfo->i_lenExtents = inode->i_size; | 1333 | iinfo->i_lenExtents = inode->i_size; |