diff options
author | Len Brown <len.brown@intel.com> | 2011-03-23 02:33:54 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-03-23 02:33:54 -0400 |
commit | 5c129a8600100a5d0f5fdbc1014c5dba1d307bc4 (patch) | |
tree | 9877a14b49cff43d0ba10c12f407ec551c77daa5 /fs/udf | |
parent | 797b10a07069e153d41aedb4ae8e76660279e2ee (diff) | |
parent | 521cb40b0c44418a4fd36dc633f575813d59a43d (diff) | |
download | linux-5c129a8600100a5d0f5fdbc1014c5dba1d307bc4.tar.gz linux-5c129a8600100a5d0f5fdbc1014c5dba1d307bc4.tar.bz2 linux-5c129a8600100a5d0f5fdbc1014c5dba1d307bc4.zip |
Merge commit 'v2.6.38' into release
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/namei.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 2be0f9eb86d2..b7c338d5e9df 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -32,6 +32,8 @@ #include <linux/crc-itu-t.h> #include <linux/exportfs.h> +enum { UDF_MAX_LINKS = 0xffff }; + static inline int udf_match(int len1, const unsigned char *name1, int len2, const unsigned char *name2) { @@ -650,7 +652,7 @@ static int udf_mkdir(struct inode *dir, struct dentry *dentry, int mode) struct udf_inode_info *iinfo; err = -EMLINK; - if (dir->i_nlink >= (256 << sizeof(dir->i_nlink)) - 1) + if (dir->i_nlink >= UDF_MAX_LINKS) goto out; err = -EIO; @@ -1034,9 +1036,8 @@ static int udf_link(struct dentry *old_dentry, struct inode *dir, struct fileIdentDesc cfi, *fi; int err; - if (inode->i_nlink >= (256 << sizeof(inode->i_nlink)) - 1) { + if (inode->i_nlink >= UDF_MAX_LINKS) return -EMLINK; - } fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); if (!fi) { @@ -1131,9 +1132,7 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, goto end_rename; retval = -EMLINK; - if (!new_inode && - new_dir->i_nlink >= - (256 << sizeof(new_dir->i_nlink)) - 1) + if (!new_inode && new_dir->i_nlink >= UDF_MAX_LINKS) goto end_rename; } if (!nfi) { |